config.json 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {
  2. "log": {
  3. "access": "none",
  4. "dnsLog": false,
  5. "error": "./error.log",
  6. "loglevel": "warning"
  7. },
  8. "api": {
  9. "tag": "api",
  10. "services": [
  11. "HandlerService",
  12. "LoggerService",
  13. "StatsService"
  14. ]
  15. },
  16. "inbounds": [
  17. {
  18. "tag": "api",
  19. "listen": "127.0.0.1",
  20. "port": 62789,
  21. "protocol": "dokodemo-door",
  22. "settings": {
  23. "address": "127.0.0.1"
  24. }
  25. }
  26. ],
  27. "outbounds": [
  28. {
  29. "tag": "direct",
  30. "protocol": "freedom",
  31. "settings": {}
  32. },
  33. {
  34. "tag": "blocked",
  35. "protocol": "blackhole",
  36. "settings": {}
  37. }
  38. ],
  39. "policy": {
  40. "levels": {
  41. "0": {
  42. "statsUserDownlink": true,
  43. "statsUserUplink": true
  44. }
  45. },
  46. "system": {
  47. "statsInboundDownlink": true,
  48. "statsInboundUplink": true,
  49. "statsOutboundDownlink": true,
  50. "statsOutboundUplink": true
  51. }
  52. },
  53. "routing": {
  54. "domainStrategy": "IPIfNonMatch",
  55. "rules": [
  56. {
  57. "type": "field",
  58. "inboundTag": [
  59. "api"
  60. ],
  61. "outboundTag": "api"
  62. },
  63. {
  64. "type": "field",
  65. "outboundTag": "blocked",
  66. "ip": [
  67. "geoip:private"
  68. ]
  69. },
  70. {
  71. "type": "field",
  72. "outboundTag": "blocked",
  73. "protocol": [
  74. "bittorrent"
  75. ]
  76. }
  77. ]
  78. },
  79. "stats": {}
  80. }