github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/docs/config.md (about)

     1  # config
     2  
     3  ```json
     4  {
     5    "ipv6": false, // enabled ipv6
     6    "net_interface": "", // unix network interface name, eg: wlo0, eno1
     7    "system_proxy": { // auto apply proxy setting to system, Windows only support http
     8      "http": true, 
     9      "socks5": false
    10    },
    11    "bypass": {
    12      "tcp": "bypass", // tcp proxy mode, support: bypass, direct, proxy, block
    13      "udp": "bypass", // udp proxy mode, same as tcp
    14      "bypass_file": "/mnt/share/Work/code/shell/ACL/yuhaiin/yuhaiin_my.conf",
    15      // bypass file location
    16      // support format
    17      /*
    18          10.0.2.1/24 direct
    19          127.0.0.1   block
    20          example.com proxy,tag=tag1,resolve_strategy=prefer_ipv6
    21          *.example.com proxy,tag=tag2
    22          *.example.* proxy
    23      */
    24      // * tag can specific node for current hostname/cidr/ip(configure in webpage)
    25      // * resolve_strategy resolve domain to ip strategy, support: prefer_ipv4,only_ipv4,prefer_ipv6,only_ipv6,default
    26      "custom_rule_v3": [// custom rule, same as bypass file, for temporary use
    27        {
    28          "hostname": [
    29            "dns.google",
    30            "dns.nextdns.io"
    31          ],
    32          "mode": "proxy",
    33          "tag": "remote_dns",
    34          "resolve_strategy": "default"
    35        },
    36        {
    37          "hostname": [
    38            "223.5.5.5"
    39          ],
    40          "mode": "direct"
    41        },
    42        {
    43          "hostname": [
    44            "example.block.domain.com"
    45          ],
    46          "mode": "block"
    47        }
    48      ]
    49    },
    50    "dns": {
    51      "server": "127.0.0.1:5353", // dns server listener(tcp&udp), empty to disabled
    52      "fakedns": false, // fakedns switch
    53      "fakedns_ip_range": "172.19.0.1/24", // fakedns ip pool cidr
    54      "resolve_remote_domain": false, // if enabled,
    55      // the proxy domain will use remote dns resolve domain to ip instead of
    56      // pass domain to proxy server
    57      "remote": { // remote dns
    58        "host": "https://dns.nextdns.io/xxxx",
    59        // host eg:
    60        // https://dns.nextdns.io
    61        // dns.nextdns.io
    62        // 8.8.8.8
    63        // 8.8.8.8:53
    64        "type": "doh", // support type: udp,tcp,doh,dot,doq,doh3
    65        "subnet": "223.5.5.5/24", // edns subnet
    66        "tls_servername": "" // tls server name, set domain in tls(doh,dot,doq,doh3)
    67      },
    68      "local": {
    69        "host": "dns.google",
    70        "type": "doh",
    71        "subnet": "223.5.5.5/24",
    72        "tls_servername": ""
    73      },
    74      "bootstrap": {
    75        "host": "223.5.5.5",
    76        "type": "udp",
    77        "subnet": "223.5.5.5/24",
    78        "tls_servername": "doh.pub"
    79      },
    80      "hosts": {
    81      // eg:
    82      // "example.com": "127.0.0.1"
    83      // "127.0.0.1": "192.168.2.1"
    84      // "google.cn": "google.com"
    85      // "8.8.8.8": "dns.google"
    86        "10.2.2.49": "192.168.11.201",
    87        "example.com": "example.com",
    88        "transmission:80": "localhost:9091"
    89      }
    90    },
    91    "server": { // local listener
    92      "servers": {
    93        "http": { // http proxy server
    94          "name": "http",
    95          "enabled": true,
    96          "http": {
    97            "host": "0.0.0.0:8188", // listener host
    98            "username": "",
    99            "password": ""
   100          }
   101        },
   102        "redir": { // linux redir
   103          "name": "redir",
   104          "enabled": false,
   105          "redir": {
   106            "host": "127.0.0.1:8088"
   107          }
   108        },
   109        "socks5": { // socks5 proxy server
   110          "name": "socks5",
   111          "enabled": true,
   112          "socks5": {
   113            "host": "0.0.0.0:1080", // listener host
   114            "username": "",
   115            "password": ""
   116          }
   117        },
   118        "tun": { // tun network
   119          "name": "tun",
   120          "enabled": false,
   121          "tun": {
   122            "name": "tun://tun0",// tun name or fd, eg: tun://tun0, fd://89
   123            "mtu": 1500,
   124            "gateway": "172.19.0.1", // tun gateway
   125            "portal": "172.19.0.2",
   126            "dns_hijacking": true, // dns_hijacking, will hijacking request for port 53
   127            "skip_multicast": true,
   128            "driver": "fdbased" // tun gvisor driver, support: fdbased, channel, system_gvisor
   129          }
   130        },
   131        "yuubinsya": { // experimental, custom protocol
   132          "name": "yuubinsya",
   133          "enabled": true,
   134          "yuubinsya": {
   135            "host": "127.0.0.1:40501",
   136            "password": "123",
   137            "force_disable_encrypt": false,
   138            "normal": {} // support: normal,websocket,grpc,quic, see protobuf IDL
   139          }
   140        }
   141      }
   142    },
   143    "logcat": {
   144      "level": "debug", // log level, support: verbose, debug, info, warning, error, fatal
   145      "save": true // save log to file switch
   146    }
   147  }
   148  ```