项目作者: jfqd

项目描述 :
Worker image with unbound and consul
高级语言: Shell
项目地址: git://github.com/jfqd/mi-qutic-worker.git
创建时间: 2018-01-06T19:06:21Z
项目社区:https://github.com/jfqd/mi-qutic-worker

开源协议:MIT License

下载


mi-qutic-worker

use joyent/mibe to create a provisionable image

installation

The following sample can be used to create a zone running a copy of the the worker image.

  1. IMAGE_UUID=$(imgadm list | grep 'qutic-worker' | tail -1 | awk '{ print $1 }')
  2. vmadm create << EOF
  3. {
  4. "brand": "joyent",
  5. "image_uuid": "$IMAGE_UUID",
  6. "alias": "worker-server",
  7. "hostname": "worker.example.com",
  8. "dns_domain": "example.com",
  9. "resolvers": [
  10. "80.80.80.80",
  11. "80.80.81.81"
  12. ],
  13. "nics": [
  14. {
  15. "interface": "net0",
  16. "nic_tag": "admin",
  17. "ip": "10.10.10.10",
  18. "gateway": "10.10.10.1",
  19. "netmask": "255.255.255.0"
  20. }
  21. ],
  22. "max_physical_memory": 512,
  23. "max_swap": 512,
  24. "quota": 10,
  25. "cpu_cap": 100,
  26. "customer_metadata": {
  27. "admin_authorized_keys": "your-long-key",
  28. "root_authorized_keys": "your-long-key",
  29. "mail_smarthost": "mail.example.com",
  30. "mail_auth_user": "you@example.com",
  31. "mail_auth_pass": "smtp-account-password",
  32. "mail_adminaddr": "report@example.com"
  33. }
  34. }
  35. EOF

dns-blocklist

To use the dns-blocklist add this crontab entry:

  1. 30 23 * * * /opt/local/bin/dns_blocklist.sh -u -s 1,2,3,4,5,6,7,8,9,10,11,12,13,14,'https://easylist.to/easylistgermany/easylistgermany.txt','https://easylist.to/easylist/easyprivacy.txt','https://easylist.to/easylist/fanboy-social.txt','https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/win7/extra.txt','https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/win7/spy.txt','https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt','https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt','https://raw.githubusercontent.com/AdguardTeam/AdguardFilters/master/MobileFilter/sections/adservers.txt','https://raw.githubusercontent.com/AdguardTeam/AdguardFilters/master/MobileFilter/sections/spyware.txt' -b /opt/local/etc/unbound/local.d/blocklist.conf -r 0.0.0.0