Projects STRLCPY sing-box Commits 959cae21
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    docs/configuration/dns/fakeip.md
     1 +# FakeIP
     2 + 
     3 +### Structure
     4 + 
     5 +```json
     6 +{
     7 + "enabled": true,
     8 + "inet4_range": "172.19.0.1/15",
     9 + "inet6_range": "fdfe:dcba:9876::1/18"
     10 +}
     11 +```
     12 + 
     13 +### Fields
     14 + 
     15 +#### enabled
     16 + 
     17 +Enable FakeIP service.
     18 + 
     19 +#### inet4_range
     20 + 
     21 +IPv4 address range for FakeIP.
     22 + 
     23 +#### inet6_address
     24 + 
     25 +IPv6 address range for FakeIP.
     26 + 
  • ■ ■ ■ ■ ■ ■
    docs/configuration/dns/fakeip.zh.md
     1 +# FakeIP
     2 + 
     3 +### 结构
     4 + 
     5 +```json
     6 +{
     7 + "enabled": true,
     8 + "inet4_range": "172.19.0.1/15",
     9 + "inet6_range": "fdfe:dcba:9876::1/18"
     10 +}
     11 +```
     12 + 
     13 +### 字段
     14 + 
     15 +#### enabled
     16 + 
     17 +启用 FakeIP 服务。
     18 + 
     19 +#### inet4_range
     20 + 
     21 +用于 FakeIP 的 IPv4 地址范围。
     22 + 
     23 +#### inet6_range
     24 + 
     25 +用于 FakeIP 的 IPv6 地址范围。
     26 + 
  • ■ ■ ■ ■ ■
    docs/configuration/dns/index.md
    skipped 10 lines
    11 11   "strategy": "",
    12 12   "disable_cache": false,
    13 13   "disable_expire": false,
    14  - "reverse_mapping": false
     14 + "reverse_mapping": false,
     15 + "fakeip": {}
    15 16   }
    16 17  }
    17 18   
    skipped 5 lines
    23 24  |----------|--------------------------------|
    24 25  | `server` | List of [DNS Server](./server) |
    25 26  | `rules` | List of [DNS Rule](./rule) |
     27 +| `fakeip` | [FakeIP](./fakeip) |
    26 28   
    27 29  #### final
    28 30   
    skipped 21 lines
    50 52   
    51 53  Stores a reverse mapping of IP addresses after responding to a DNS query in order to provide domain names when routing.
    52 54   
    53  -Since this process relies on the act of resolving domain names by an application before making a request, it can be problematic in environments such as macOS, where DNS is proxied and cached by the system.
     55 +Since this process relies on the act of resolving domain names by an application before making a request, it can be
     56 +problematic in environments such as macOS, where DNS is proxied and cached by the system.
     57 + 
     58 +#### fakeip
     59 + 
     60 +[FakeIP](./fakeip) settings.
    54 61   
  • ■ ■ ■ ■ ■
    docs/configuration/dns/index.zh.md
    skipped 10 lines
    11 11   "strategy": "",
    12 12   "disable_cache": false,
    13 13   "disable_expire": false,
    14  - "reverse_mapping": false
     14 + "reverse_mapping": false,
     15 + "fakeip": {}
    15 16   }
    16 17  }
    17 18   
    skipped 34 lines
    52 53   
    53 54  由于此过程依赖于应用程序在发出请求之前解析域名的行为,因此在 macOS 等 DNS 由系统代理和缓存的环境中可能会出现问题。
    54 55   
     56 +#### fakeip
     57 + 
     58 +[FakeIP](./fakeip) 设置。
     59 + 
  • ■ ■ ■ ■ ■ ■
    docs/configuration/dns/rule.md
    skipped 83 lines
    84 84   "direct"
    85 85   ],
    86 86   "server": "local",
    87  - "disable_cache": false
     87 + "disable_cache": false,
     88 + "rewrite_ttl": 100
    88 89   },
    89 90   {
    90 91   "type": "logical",
    91 92   "mode": "and",
    92 93   "rules": [],
    93 94   "server": "local",
    94  - "disable_cache": false
     95 + "disable_cache": false,
     96 + "rewrite_ttl": 100
    95 97   }
    96 98   ]
    97 99   }
    skipped 144 lines
    242 244   
    243 245  Disable cache and save cache in this query.
    244 246   
     247 +#### rewrite_ttl
     248 + 
     249 +Rewrite TTL in DNS responses.
     250 + 
    245 251  ### Logical Fields
    246 252   
    247 253  #### type
    skipped 7 lines
    255 261  #### rules
    256 262   
    257 263  Included default rules.
    258  - 
    259  -#### invert
    260  - 
    261  -Invert match result.
    262  - 
    263  -#### server
    264  - 
    265  -==Required==
    266  - 
    267  -Tag of the target dns server.
    268  - 
    269  -#### disable_cache
    270  - 
    271  -Disable cache and save cache in this query.
  • ■ ■ ■ ■ ■
    docs/configuration/dns/rule.zh.md
    skipped 240 lines
    241 241   
    242 242  在此查询中禁用缓存。
    243 243   
     244 +#### rewrite_ttl
     245 + 
     246 +重写 DNS 回应中的 TTL。
     247 + 
    244 248  ### 逻辑字段
    245 249   
    246 250  #### type
    skipped 4 lines
    251 255   
    252 256  `and` 或 `or`
    253 257   
    254  -#### rules
    255  - 
    256  -包括的默认规则。
    257  - 
    258  -#### invert
    259  - 
    260  -反选匹配结果。
    261  - 
    262  -#### server
    263  - 
    264  -==必填==
    265  - 
    266  -目标 DNS 服务器的标签。
    267  - 
    268  -#### disable_cache
    269  - 
    270  -在此查询中禁用缓存。
  • ■ ■ ■ ■ ■ ■
    docs/configuration/dns/server.md
    skipped 29 lines
    30 30   
    31 31  The address of the dns server.
    32 32   
    33  -| Protocol | Format |
    34  -|----------|-------------------------------|
    35  -| `System` | `local` |
    36  -| `TCP` | `tcp://1.0.0.1` |
    37  -| `UDP` | `8.8.8.8` `udp://8.8.4.4` |
    38  -| `TLS` | `tls://dns.google` |
    39  -| `HTTPS` | `https://1.1.1.1/dns-query` |
    40  -| `QUIC` | `quic://dns.adguard.com` |
    41  -| `HTTP3` | `h3://8.8.8.8/dns-query` |
    42  -| `RCode` | `rcode://refused` |
    43  -| `DHCP` | `dhcp://auto` or `dhcp://en0` |
     33 +| Protocol | Format |
     34 +|---------------------|-------------------------------|
     35 +| `System` | `local` |
     36 +| `TCP` | `tcp://1.0.0.1` |
     37 +| `UDP` | `8.8.8.8` `udp://8.8.4.4` |
     38 +| `TLS` | `tls://dns.google` |
     39 +| `HTTPS` | `https://1.1.1.1/dns-query` |
     40 +| `QUIC` | `quic://dns.adguard.com` |
     41 +| `HTTP3` | `h3://8.8.8.8/dns-query` |
     42 +| `RCode` | `rcode://refused` |
     43 +| `DHCP` | `dhcp://auto` or `dhcp://en0` |
     44 +| [FakeIP](./fakeip) | `fakeip` |
    44 45   
    45 46  !!! warning ""
    46 47   
    skipped 50 lines
  • ■ ■ ■ ■ ■ ■
    docs/configuration/dns/server.zh.md
    skipped 29 lines
    30 30   
    31 31  DNS 服务器的地址。
    32 32   
    33  -| 协议 | 格式 |
    34  -|----------|------------------------------|
    35  -| `System` | `local` |
    36  -| `TCP` | `tcp://1.0.0.1` |
    37  -| `UDP` | `8.8.8.8` `udp://8.8.4.4` |
    38  -| `TLS` | `tls://dns.google` |
    39  -| `HTTPS` | `https://1.1.1.1/dns-query` |
    40  -| `QUIC` | `quic://dns.adguard.com` |
    41  -| `HTTP3` | `h3://8.8.8.8/dns-query` |
    42  -| `RCode` | `rcode://refused` |
    43  -| `DHCP` | `dhcp://auto` 或 `dhcp://en0` |
     33 +| 协议 | 格式 |
     34 +|--------------------|------------------------------|
     35 +| `System` | `local` |
     36 +| `TCP` | `tcp://1.0.0.1` |
     37 +| `UDP` | `8.8.8.8` `udp://8.8.4.4` |
     38 +| `TLS` | `tls://dns.google` |
     39 +| `HTTPS` | `https://1.1.1.1/dns-query` |
     40 +| `QUIC` | `quic://dns.adguard.com` |
     41 +| `HTTP3` | `h3://8.8.8.8/dns-query` |
     42 +| `RCode` | `rcode://refused` |
     43 +| `DHCP` | `dhcp://auto` 或 `dhcp://en0` |
     44 +| [FakeIP](./fakeip) | `fakeip` |
    44 45   
    45 46  !!! warning ""
    46 47   
    skipped 51 lines
  • ■ ■ ■ ■ ■ ■
    docs/faq/fakeip.md
     1 +# FakeIP
     2 + 
     3 +FakeIP refers to a type of behavior in a program that simultaneously hijacks both DNS and connection requests. It
     4 +responds to DNS requests with virtual results and restores mapping when accepting connections.
     5 + 
     6 +#### Advantage
     7 + 
     8 +* Retrieve the requested domain in places like IP routing (L3) where traffic detection is not possible to assist with routing.
     9 +* Decrease an RTT on the first TCP request to a domain (the most common reason).
     10 + 
     11 +#### Limitation
     12 + 
     13 +* Its mechanism breaks applications that depend on returning correct remote addresses.
     14 +* Only A and AAAA (IP) requests are supported, which may break applications that rely on other requests.
     15 + 
     16 +#### Recommendation
     17 + 
     18 +* Do not use if you do not need L3 routing.
     19 +* If using tun, make sure FakeIP ranges is included in the tun's routes.
     20 +* Enable `experimental.clash_api.store_fakeip` to persist FakeIP records, or use `dns.rules.rewrite_ttl` to avoid losing records after program restart in DNS cached environments.
     21 + 
  • ■ ■ ■ ■ ■ ■
    docs/faq/fakeip.zh.md
     1 +# FakeIP
     2 + 
     3 +FakeIP 是指同时劫持 DNS 和连接请求的程序中的一种行为。它通过虚拟结果响应 DNS 请求,在接受连接时恢复映射。
     4 + 
     5 +#### 优点
     6 + 
     7 +* 在像 L3 路由这样无法进行流量探测的地方检索所请求的域名,以协助路由。
     8 +* 减少对一个域的第一个 TCP 请求的 RTT(这是最常见的原因)。
     9 + 
     10 +#### 限制
     11 + 
     12 +* 它的机制会破坏依赖于返回正确远程地址的应用程序。
     13 +* 仅支持 A 和 AAAA(IP)请求,这可能会破坏依赖于其他请求的应用程序。
     14 + 
     15 +#### 建议
     16 + 
     17 +* 如果不需要 L3 路由,请勿使用。
     18 +* 如果使用 tun,请确保 tun 路由中包含 FakeIP 地址范围。
     19 +* 启用 `experimental.clash_api.store_fakeip` 以持久化 FakeIP 记录,或者使用 `dns.rules.rewrite_ttl` 避免程序重启后在 DNS 被缓存的环境中丢失记录。
     20 + 
  • ■ ■ ■ ■ ■ ■
    docs/faq/index.md
    skipped 10 lines
    11 11  If it bothers you that sing-box is missing feature X, please forgive us and investigate the features that sing-box does
    12 12  have. You might find that they compensate in interesting ways for the lack of X.
    13 13   
    14  -#### Fake IP
    15  - 
    16  -Fake IP (also called Fake DNS) is an invasive and imperfect DNS solution that breaks expected behavior, causes DNS leaks
    17  -and makes many software unusable. It is recommended by some software that lacks DNS processing and caching, but sing-box
    18  -does not need this.
    19  - 
    20 14  #### Naive outbound
    21 15   
    22 16  NaïveProxy's main function is chromium's network stack, and it makes no sense to implement only its transport protocol.
    skipped 42 lines
  • ■ ■ ■ ■ ■
    docs/faq/index.zh.md
    skipped 8 lines
    9 9   
    10 10  如果 sing-box 缺少功能 X 让您感到困扰,请原谅我们并调查 sing-box 确实有的功能。 您可能会发现它们以有趣的方式弥补了 X 的缺失。
    11 11   
    12  -#### Fake IP
    13  - 
    14  -Fake IP(也称 Fake DNS)是一种侵入性和不完善的 DNS 解决方案,它打破了预期的行为,导致 DNS 泄漏并使许多软件无法使用。
    15  -一些缺乏 DNS 处理和缓存的软件推荐使用它,但 sing-box 不需要。
    16  - 
    17 12  #### Naive 出站
    18 13   
    19 14  NaïveProxy 的主要功能是 chromium 的网络栈,仅实现它的传输协议是舍本逐末的。
    skipped 36 lines
  • ■ ■ ■ ■ ■ ■
    mkdocs.yml
    skipped 47 lines
    48 48   - configuration/dns/index.md
    49 49   - DNS Server: configuration/dns/server.md
    50 50   - DNS Rule: configuration/dns/rule.md
     51 + - FakeIP: configuration/dns/fakeip.md
    51 52   - NTP:
    52 53   - configuration/ntp/index.md
    53 54   - Route:
    skipped 49 lines
    103 104   - URLTest: configuration/outbound/urltest.md
    104 105   - FAQ:
    105 106   - faq/index.md
     107 + - FakeIP: faq/fakeip.md
    106 108   - Known Issues: faq/known-issues.md
    107 109   - Examples:
    108 110   - examples/index.md
    skipped 3 lines
    112 114   - Shadowsocks: examples/shadowsocks.md
    113 115   - ShadowTLS: examples/shadowtls.md
    114 116   - Clash API: examples/clash-api.md
     117 + - WireGuard Direct: examples/wireguard-direct.md
    115 118   - Contributing:
    116 119   - contributing/index.md
    117 120   - Developing:
    skipped 75 lines
Please wait...
Page is in error, reload to recover