improve sing-box config and update friend info
This commit is contained in:
@@ -126,7 +126,7 @@
|
|||||||
{
|
{
|
||||||
"type": "tun",
|
"type": "tun",
|
||||||
"tag": "tun-in",
|
"tag": "tun-in",
|
||||||
"interface_name": "singbox-tun-0",
|
"interface_name": "utun42",
|
||||||
"inet4_address": "172.19.0.1/30",
|
"inet4_address": "172.19.0.1/30",
|
||||||
"inet6_address": "fdfe:dcba:9876::1/126",
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
"mtu": 9000,
|
"mtu": 9000,
|
||||||
|
|||||||
@@ -357,6 +357,204 @@ This is my personal configuration. Obviously, exposing it to the public network
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## MacOS Client
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"level": "info",
|
||||||
|
"timestamp": true
|
||||||
|
},
|
||||||
|
"dns": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"tag": "dns_proxy",
|
||||||
|
"address": "https://1.1.1.1/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns_direct",
|
||||||
|
"address": "https://dns.alidns.com/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"detour": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns_resolver",
|
||||||
|
"address": "223.5.5.5",
|
||||||
|
"detour": "direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"outbound": "any",
|
||||||
|
"server": "dns_resolver"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn",
|
||||||
|
"server": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn",
|
||||||
|
"server": "dns_direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final": "dns_proxy"
|
||||||
|
},
|
||||||
|
"route": {
|
||||||
|
"rule_set": [
|
||||||
|
{
|
||||||
|
"tag": "geosite-geolocation-!cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "geoip-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "geosite-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"protocol": "dns",
|
||||||
|
"outbound": "dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 853,
|
||||||
|
"network": "tcp",
|
||||||
|
"outbound": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": [
|
||||||
|
443,
|
||||||
|
853
|
||||||
|
],
|
||||||
|
"network": "udp",
|
||||||
|
"outbound": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "logical",
|
||||||
|
"mode": "and",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn",
|
||||||
|
"invert": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbound": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "logical",
|
||||||
|
"mode": "and",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbound": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn",
|
||||||
|
"outbound": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip_is_private": true,
|
||||||
|
"outbound": "direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final": "proxy",
|
||||||
|
"auto_detect_interface": true
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"type": "tun",
|
||||||
|
"tag": "tun-in",
|
||||||
|
"interface_name": "utun42",
|
||||||
|
"inet4_address": "172.19.0.1/30",
|
||||||
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
|
"mtu": 9000,
|
||||||
|
"auto_route": true,
|
||||||
|
"strict_route": true,
|
||||||
|
"stack": "mixed",
|
||||||
|
"sniff": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"type": "vless",
|
||||||
|
"tag": "proxy",
|
||||||
|
"server": "154.17.5.35",
|
||||||
|
"server_port": 443,
|
||||||
|
"uuid": "9337d5ec-b489-4bf4-a22c-19f7f6e8fbbd",
|
||||||
|
"flow": "xtls-rprx-vision",
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"utls": {
|
||||||
|
"enabled": true,
|
||||||
|
"fingerprint": "chrome"
|
||||||
|
},
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"public_key": "dpU-LTUuyoCyox_4fh5n-h5NCsSSUKXayFsOsfcIzRA",
|
||||||
|
"short_id": "7fcff4362963e98e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": false,
|
||||||
|
"protocol": "h2mux",
|
||||||
|
"max_streams": 32,
|
||||||
|
"padding": true,
|
||||||
|
"brutal": {
|
||||||
|
"enabled": false,
|
||||||
|
"up_mbps": 1000,
|
||||||
|
"down_mbps": 100
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
"packet_encoding": "xudp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "direct",
|
||||||
|
"tag": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"tag": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "dns",
|
||||||
|
"tag": "dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"experimental": {
|
||||||
|
"cache_file": {
|
||||||
|
"enabled": true,
|
||||||
|
"path": "cache.db"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Android Client
|
## Android Client
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -601,7 +799,7 @@ mtr jamesflare.com
|
|||||||
brew install sing-box
|
brew install sing-box
|
||||||
wget -c https://www.jamesflare.com/en/get-my-proxy/client-macos.json -O ~/sing-box/config.json
|
wget -c https://www.jamesflare.com/en/get-my-proxy/client-macos.json -O ~/sing-box/config.json
|
||||||
|
|
||||||
sing-box run -c ~/sing-box/config.json
|
sudo sing-box run -c ~/sing-box/config.json
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run sing-box Android Client
|
### Run sing-box Android Client
|
||||||
|
|||||||
@@ -113,48 +113,54 @@ Now, let's fill them into the right place and finish the config. If you want to
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"log":{
|
"log": {
|
||||||
"level":"info"
|
"level": "info"
|
||||||
},
|
},
|
||||||
"inbounds":[
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"type":"vless",
|
"type": "vless",
|
||||||
"tag":"vless-in",
|
"tag": "vless-in",
|
||||||
"listen":"0.0.0.0",
|
"listen": "::",
|
||||||
"listen_port":443,
|
"listen_port": 443,
|
||||||
"users":[
|
"users": [
|
||||||
{
|
{
|
||||||
"name":"jamesflare",
|
"name": "jamesflare",
|
||||||
"uuid":"11391936-7544-4af5-ad02-e9f3970b1f64",
|
"uuid": "11391936-7544-4af5-ad02-e9f3970b1f64",
|
||||||
"flow":"xtls-rprx-vision"
|
"flow": "xtls-rprx-vision"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"handshake": {
|
||||||
|
"server": "portfolio.newschool.edu",
|
||||||
|
"server_port": 443
|
||||||
|
},
|
||||||
|
"private_key": "0H5tYLhpDT_r675UC93iWAS2LqN6mPZoDcVDqsff018",
|
||||||
|
"short_id": [
|
||||||
|
"26079ba8291ff0fc"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": false,
|
||||||
|
"padding": true,
|
||||||
|
"brutal": {
|
||||||
|
"enabled": false,
|
||||||
|
"up_mbps": 1000,
|
||||||
|
"down_mbps": 1000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
"tls":{
|
],
|
||||||
"enabled":true,
|
"outbounds": [
|
||||||
"server_name":"www.rpi.edu",
|
{
|
||||||
"reality":{
|
"type": "direct",
|
||||||
"enabled":true,
|
"tag": "direct"
|
||||||
"handshake":{
|
}
|
||||||
"server":"www.rpi.edu",
|
]
|
||||||
"server_port":443
|
|
||||||
},
|
|
||||||
"private_key":"0H5tYLhpDT_r675UC93iWAS2LqN6mPZoDcVDqsff018",
|
|
||||||
"short_id":[
|
|
||||||
"26079ba8291ff0fc"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"multiplex":{
|
|
||||||
"enabled":false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds":[
|
|
||||||
{
|
|
||||||
"type":"direct",
|
|
||||||
"tag":"direct"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -187,94 +193,211 @@ make sure your value match the server-side information. Here is an example:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"log":{
|
"dns": {
|
||||||
"level":"info",
|
"final": "dns_proxy",
|
||||||
"timestamp":true
|
"rules": [
|
||||||
},
|
|
||||||
"dns":{
|
|
||||||
"servers":[
|
|
||||||
{
|
{
|
||||||
"tag":"cloudflare",
|
"outbound": "any",
|
||||||
"address":"1.1.1.1"
|
"server": "dns_resolver"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn",
|
||||||
|
"server": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn",
|
||||||
|
"server": "dns_direct"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rules":[
|
"servers": [
|
||||||
{
|
{
|
||||||
"outbound":"any",
|
"address": "https://1.1.1.1/dns-query",
|
||||||
"server":"cloudflare"
|
"address_resolver": "dns_resolver",
|
||||||
|
"detour": "proxy",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"tag": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"address": "https://dns.alidns.com/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"detour": "direct",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"tag": "dns_direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"address": "223.5.5.5",
|
||||||
|
"detour": "direct",
|
||||||
|
"tag": "dns_resolver"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"strategy":"ipv4_only"
|
|
||||||
},
|
},
|
||||||
"inbounds":[
|
"experimental": {
|
||||||
|
"cache_file": {
|
||||||
|
"enabled": true,
|
||||||
|
"path": "cache.db"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"type":"tun",
|
"auto_route": true,
|
||||||
"tag":"tun-in",
|
"inet4_address": "172.19.0.1/30",
|
||||||
"interface_name":"tun0",
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
"inet4_address":"172.28.0.1/30",
|
"interface_name": "tun0",
|
||||||
"auto_route":true,
|
"mtu": 9000,
|
||||||
"strict_route":true,
|
"sniff": true,
|
||||||
"stack":"system",
|
"stack": "mixed",
|
||||||
"sniff":true
|
"strict_route": true,
|
||||||
|
"tag": "tun-in",
|
||||||
|
"type": "tun"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"domain_strategy": "prefer_ipv6",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": 1080,
|
||||||
|
"set_system_proxy": false,
|
||||||
|
"sniff": false,
|
||||||
|
"sniff_override_destination": false,
|
||||||
|
"sniff_timeout": "300ms",
|
||||||
|
"tag": "mixed-in",
|
||||||
|
"tcp_fast_open": true,
|
||||||
|
"tcp_multi_path": true,
|
||||||
|
"type": "mixed",
|
||||||
|
"udp_disable_domain_unmapping": false,
|
||||||
|
"udp_fragment": true,
|
||||||
|
"udp_timeout": "5m"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbounds":[
|
"log": {
|
||||||
|
"level": "info",
|
||||||
|
"timestamp": true
|
||||||
|
},
|
||||||
|
"outbounds": [
|
||||||
{
|
{
|
||||||
"type":"vless",
|
"flow": "xtls-rprx-vision",
|
||||||
"tag":"vless-out",
|
"multiplex": {
|
||||||
"server":"your.server.ip.or.domain",
|
"brutal": {
|
||||||
"server_port":443,
|
"down_mbps": 100,
|
||||||
"uuid":"11391936-7544-4af5-ad02-e9f3970b1f64",
|
"enabled": false,
|
||||||
"flow":"xtls-rprx-vision",
|
"up_mbps": 1000
|
||||||
"tls":{
|
|
||||||
"enabled":true,
|
|
||||||
"server_name":"www.rpi.edu",
|
|
||||||
"utls":{
|
|
||||||
"enabled":true,
|
|
||||||
"fingerprint":"chrome"
|
|
||||||
},
|
},
|
||||||
"reality":{
|
"enabled": false,
|
||||||
"enabled":true,
|
"max_streams": 32,
|
||||||
"public_key":"SeIw41mp1LFEd6CEGArmnSoaIXzNlwnkIbduoEY-OXk",
|
"padding": true,
|
||||||
"short_id":"26079ba8291ff0fc"
|
"protocol": "h2mux"
|
||||||
|
},
|
||||||
|
"packet_encoding": "xudp",
|
||||||
|
"server": "your.server.ip.or.domain",
|
||||||
|
"server_port": 443,
|
||||||
|
"tag": "proxy",
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"public_key": "SeIw41mp1LFEd6CEGArmnSoaIXzNlwnkIbduoEY-OXk",
|
||||||
|
"short_id": "26079ba8291ff0fc"
|
||||||
|
},
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"utls": {
|
||||||
|
"enabled": true,
|
||||||
|
"fingerprint": "chrome"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packet_encoding":"xudp",
|
"type": "vless",
|
||||||
"multiplex":{
|
"uuid": "11391936-7544-4af5-ad02-e9f3970b1f64"
|
||||||
"enabled":false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"direct",
|
"tag": "direct",
|
||||||
"tag":"direct"
|
"type": "direct"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"dns",
|
"tag": "block",
|
||||||
"tag":"dns"
|
"type": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns-out",
|
||||||
|
"type": "dns"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"route":{
|
"route": {
|
||||||
"geoip":{
|
"auto_detect_interface": true,
|
||||||
"download_url":"https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db",
|
"final": "proxy",
|
||||||
"download_detour":"vless-out"
|
"rule_set": [
|
||||||
},
|
|
||||||
"geosite":{
|
|
||||||
"download_url":"https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db",
|
|
||||||
"download_detour":"vless-out"
|
|
||||||
},
|
|
||||||
"rules":[
|
|
||||||
{
|
{
|
||||||
"protocol":"dns",
|
"download_detour": "proxy",
|
||||||
"outbound":"dns"
|
"format": "binary",
|
||||||
|
"tag": "geosite-geolocation-!cn",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"geoip":[
|
"download_detour": "proxy",
|
||||||
"private"
|
"format": "binary",
|
||||||
],
|
"tag": "geoip-cn",
|
||||||
"outbound":"direct"
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"download_detour": "proxy",
|
||||||
|
"format": "binary",
|
||||||
|
"tag": "geosite-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"auto_detect_interface":true
|
"rules": [
|
||||||
|
{
|
||||||
|
"outbound": "dns-out",
|
||||||
|
"protocol": "dns"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network": "tcp",
|
||||||
|
"outbound": "block",
|
||||||
|
"port": 853
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network": "udp",
|
||||||
|
"outbound": "block",
|
||||||
|
"port": [
|
||||||
|
443,
|
||||||
|
853
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mode": "and",
|
||||||
|
"outbound": "proxy",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"invert": true,
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "logical"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mode": "and",
|
||||||
|
"outbound": "direct",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "logical"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"outbound": "direct",
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip_is_private": true,
|
||||||
|
"outbound": "direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -369,4 +492,4 @@ C:\Users\James\Desktop\Softwares\sing-box>sing-box run -c xray-ny-a-client.json
|
|||||||
-0500 2023-12-27 23:23:32 INFO [1067986987 0ms] inbound/tun[tun-in]: inbound packet connection from 172.28.0.1:58423
|
-0500 2023-12-27 23:23:32 INFO [1067986987 0ms] inbound/tun[tun-in]: inbound packet connection from 172.28.0.1:58423
|
||||||
-0500 2023-12-27 23:23:32 INFO [2253360887 0ms] inbound/tun[tun-in]: inbound connection from 172.28.0.1:60610
|
-0500 2023-12-27 23:23:32 INFO [2253360887 0ms] inbound/tun[tun-in]: inbound connection from 172.28.0.1:60610
|
||||||
-0500 2023-12-27 23:23:32 INFO outbound/vless[vless-out]: outbound packet connection to 1.1.1.1:53
|
-0500 2023-12-27 23:23:32 INFO outbound/vless[vless-out]: outbound packet connection to 1.1.1.1:53
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
{
|
{
|
||||||
"type": "tun",
|
"type": "tun",
|
||||||
"tag": "tun-in",
|
"tag": "tun-in",
|
||||||
"interface_name": "tun0",
|
"interface_name": "utun42",
|
||||||
"inet4_address": "172.19.0.1/30",
|
"inet4_address": "172.19.0.1/30",
|
||||||
"inet6_address": "fdfe:dcba:9876::1/126",
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
"mtu": 9000,
|
"mtu": 9000,
|
||||||
|
|||||||
@@ -357,6 +357,204 @@ repost:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## MacOS 客户端
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"level": "info",
|
||||||
|
"timestamp": true
|
||||||
|
},
|
||||||
|
"dns": {
|
||||||
|
"servers": [
|
||||||
|
{
|
||||||
|
"tag": "dns_proxy",
|
||||||
|
"address": "https://1.1.1.1/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns_direct",
|
||||||
|
"address": "https://dns.alidns.com/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"detour": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns_resolver",
|
||||||
|
"address": "223.5.5.5",
|
||||||
|
"detour": "direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"outbound": "any",
|
||||||
|
"server": "dns_resolver"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn",
|
||||||
|
"server": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn",
|
||||||
|
"server": "dns_direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final": "dns_proxy"
|
||||||
|
},
|
||||||
|
"route": {
|
||||||
|
"rule_set": [
|
||||||
|
{
|
||||||
|
"tag": "geosite-geolocation-!cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "geoip-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "geosite-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"format": "binary",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
|
||||||
|
"download_detour": "proxy"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"protocol": "dns",
|
||||||
|
"outbound": "dns-out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": 853,
|
||||||
|
"network": "tcp",
|
||||||
|
"outbound": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"port": [
|
||||||
|
443,
|
||||||
|
853
|
||||||
|
],
|
||||||
|
"network": "udp",
|
||||||
|
"outbound": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "logical",
|
||||||
|
"mode": "and",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn",
|
||||||
|
"invert": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbound": "proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "logical",
|
||||||
|
"mode": "and",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbound": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn",
|
||||||
|
"outbound": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip_is_private": true,
|
||||||
|
"outbound": "direct"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"final": "proxy",
|
||||||
|
"auto_detect_interface": true
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
|
{
|
||||||
|
"type": "tun",
|
||||||
|
"tag": "tun-in",
|
||||||
|
"interface_name": "utun42",
|
||||||
|
"inet4_address": "172.19.0.1/30",
|
||||||
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
|
"mtu": 9000,
|
||||||
|
"auto_route": true,
|
||||||
|
"strict_route": true,
|
||||||
|
"stack": "mixed",
|
||||||
|
"sniff": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outbounds": [
|
||||||
|
{
|
||||||
|
"type": "vless",
|
||||||
|
"tag": "proxy",
|
||||||
|
"server": "154.17.5.35",
|
||||||
|
"server_port": 443,
|
||||||
|
"uuid": "9337d5ec-b489-4bf4-a22c-19f7f6e8fbbd",
|
||||||
|
"flow": "xtls-rprx-vision",
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"utls": {
|
||||||
|
"enabled": true,
|
||||||
|
"fingerprint": "chrome"
|
||||||
|
},
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"public_key": "dpU-LTUuyoCyox_4fh5n-h5NCsSSUKXayFsOsfcIzRA",
|
||||||
|
"short_id": "7fcff4362963e98e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": false,
|
||||||
|
"protocol": "h2mux",
|
||||||
|
"max_streams": 32,
|
||||||
|
"padding": true,
|
||||||
|
"brutal": {
|
||||||
|
"enabled": false,
|
||||||
|
"up_mbps": 1000,
|
||||||
|
"down_mbps": 100
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
"packet_encoding": "xudp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "direct",
|
||||||
|
"tag": "direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"tag": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "dns",
|
||||||
|
"tag": "dns-out"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"experimental": {
|
||||||
|
"cache_file": {
|
||||||
|
"enabled": true,
|
||||||
|
"path": "cache.db"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Android 客户端
|
## Android 客户端
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -113,48 +113,54 @@ sing-box generate uuid
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"log":{
|
"log": {
|
||||||
"level":"info"
|
"level": "info"
|
||||||
},
|
},
|
||||||
"inbounds":[
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"type":"vless",
|
"type": "vless",
|
||||||
"tag":"vless-in",
|
"tag": "vless-in",
|
||||||
"listen":"0.0.0.0",
|
"listen": "::",
|
||||||
"listen_port":443,
|
"listen_port": 443,
|
||||||
"users":[
|
"users": [
|
||||||
{
|
{
|
||||||
"name":"jamesflare",
|
"name": "jamesflare",
|
||||||
"uuid":"11391936-7544-4af5-ad02-e9f3970b1f64",
|
"uuid": "11391936-7544-4af5-ad02-e9f3970b1f64",
|
||||||
"flow":"xtls-rprx-vision"
|
"flow": "xtls-rprx-vision"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"handshake": {
|
||||||
|
"server": "portfolio.newschool.edu",
|
||||||
|
"server_port": 443
|
||||||
|
},
|
||||||
|
"private_key": "0H5tYLhpDT_r675UC93iWAS2LqN6mPZoDcVDqsff018",
|
||||||
|
"short_id": [
|
||||||
|
"26079ba8291ff0fc"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"multiplex": {
|
||||||
|
"enabled": false,
|
||||||
|
"padding": true,
|
||||||
|
"brutal": {
|
||||||
|
"enabled": false,
|
||||||
|
"up_mbps": 1000,
|
||||||
|
"down_mbps": 1000
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
"tls":{
|
],
|
||||||
"enabled":true,
|
"outbounds": [
|
||||||
"server_name":"www.rpi.edu",
|
{
|
||||||
"reality":{
|
"type": "direct",
|
||||||
"enabled":true,
|
"tag": "direct"
|
||||||
"handshake":{
|
}
|
||||||
"server":"www.rpi.edu",
|
]
|
||||||
"server_port":443
|
|
||||||
},
|
|
||||||
"private_key":"0H5tYLhpDT_r675UC93iWAS2LqN6mPZoDcVDqsff018",
|
|
||||||
"short_id":[
|
|
||||||
"26079ba8291ff0fc"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"multiplex":{
|
|
||||||
"enabled":false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"outbounds":[
|
|
||||||
{
|
|
||||||
"type":"direct",
|
|
||||||
"tag":"direct"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -162,7 +168,7 @@ sing-box generate uuid
|
|||||||
|
|
||||||
- `name`
|
- `name`
|
||||||
- `uuid`
|
- `uuid`
|
||||||
- `server_name`
|
- `server_name`
|
||||||
- `server`
|
- `server`
|
||||||
- `server_port`
|
- `server_port`
|
||||||
- `private_key`
|
- `private_key`
|
||||||
@@ -175,7 +181,7 @@ sing-box generate uuid
|
|||||||
你需要将以下字段更改为你自己的值:
|
你需要将以下字段更改为你自己的值:
|
||||||
|
|
||||||
- `server`
|
- `server`
|
||||||
- `server_port`
|
- `server_port`
|
||||||
- `uuid`
|
- `uuid`
|
||||||
- `server_name`
|
- `server_name`
|
||||||
- `public_key`
|
- `public_key`
|
||||||
@@ -185,94 +191,211 @@ sing-box generate uuid
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"log":{
|
"dns": {
|
||||||
"level":"info",
|
"final": "dns_proxy",
|
||||||
"timestamp":true
|
"rules": [
|
||||||
},
|
|
||||||
"dns":{
|
|
||||||
"servers":[
|
|
||||||
{
|
{
|
||||||
"tag":"cloudflare",
|
"outbound": "any",
|
||||||
"address":"1.1.1.1"
|
"server": "dns_resolver"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn",
|
||||||
|
"server": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn",
|
||||||
|
"server": "dns_direct"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rules":[
|
"servers": [
|
||||||
{
|
{
|
||||||
"outbound":"any",
|
"address": "https://1.1.1.1/dns-query",
|
||||||
"server":"cloudflare"
|
"address_resolver": "dns_resolver",
|
||||||
|
"detour": "proxy",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"tag": "dns_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"address": "https://dns.alidns.com/dns-query",
|
||||||
|
"address_resolver": "dns_resolver",
|
||||||
|
"detour": "direct",
|
||||||
|
"strategy": "prefer_ipv6",
|
||||||
|
"tag": "dns_direct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"address": "223.5.5.5",
|
||||||
|
"detour": "direct",
|
||||||
|
"tag": "dns_resolver"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"strategy":"ipv4_only"
|
|
||||||
},
|
},
|
||||||
"inbounds":[
|
"experimental": {
|
||||||
|
"cache_file": {
|
||||||
|
"enabled": true,
|
||||||
|
"path": "cache.db"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"type":"tun",
|
"auto_route": true,
|
||||||
"tag":"tun-in",
|
"inet4_address": "172.19.0.1/30",
|
||||||
"interface_name":"tun0",
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
"inet4_address":"172.28.0.1/30",
|
"interface_name": "tun0",
|
||||||
"auto_route":true,
|
"mtu": 9000,
|
||||||
"strict_route":true,
|
"sniff": true,
|
||||||
"stack":"system",
|
"stack": "mixed",
|
||||||
"sniff":true
|
"strict_route": true,
|
||||||
|
"tag": "tun-in",
|
||||||
|
"type": "tun"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"domain_strategy": "prefer_ipv6",
|
||||||
|
"listen": "::",
|
||||||
|
"listen_port": 1080,
|
||||||
|
"set_system_proxy": false,
|
||||||
|
"sniff": false,
|
||||||
|
"sniff_override_destination": false,
|
||||||
|
"sniff_timeout": "300ms",
|
||||||
|
"tag": "mixed-in",
|
||||||
|
"tcp_fast_open": true,
|
||||||
|
"tcp_multi_path": true,
|
||||||
|
"type": "mixed",
|
||||||
|
"udp_disable_domain_unmapping": false,
|
||||||
|
"udp_fragment": true,
|
||||||
|
"udp_timeout": "5m"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbounds":[
|
"log": {
|
||||||
|
"level": "info",
|
||||||
|
"timestamp": true
|
||||||
|
},
|
||||||
|
"outbounds": [
|
||||||
{
|
{
|
||||||
"type":"vless",
|
"flow": "xtls-rprx-vision",
|
||||||
"tag":"vless-out",
|
"multiplex": {
|
||||||
"server":"your.server.ip.or.domain",
|
"brutal": {
|
||||||
"server_port":443,
|
"down_mbps": 100,
|
||||||
"uuid":"11391936-7544-4af5-ad02-e9f3970b1f64",
|
"enabled": false,
|
||||||
"flow":"xtls-rprx-vision",
|
"up_mbps": 1000
|
||||||
"tls":{
|
|
||||||
"enabled":true,
|
|
||||||
"server_name":"www.rpi.edu",
|
|
||||||
"utls":{
|
|
||||||
"enabled":true,
|
|
||||||
"fingerprint":"chrome"
|
|
||||||
},
|
},
|
||||||
"reality":{
|
"enabled": false,
|
||||||
"enabled":true,
|
"max_streams": 32,
|
||||||
"public_key":"SeIw41mp1LFEd6CEGArmnSoaIXzNlwnkIbduoEY-OXk",
|
"padding": true,
|
||||||
"short_id":"26079ba8291ff0fc"
|
"protocol": "h2mux"
|
||||||
|
},
|
||||||
|
"packet_encoding": "xudp",
|
||||||
|
"server": "your.server.ip.or.domain",
|
||||||
|
"server_port": 443,
|
||||||
|
"tag": "proxy",
|
||||||
|
"tls": {
|
||||||
|
"enabled": true,
|
||||||
|
"reality": {
|
||||||
|
"enabled": true,
|
||||||
|
"public_key": "SeIw41mp1LFEd6CEGArmnSoaIXzNlwnkIbduoEY-OXk",
|
||||||
|
"short_id": "26079ba8291ff0fc"
|
||||||
|
},
|
||||||
|
"server_name": "portfolio.newschool.edu",
|
||||||
|
"utls": {
|
||||||
|
"enabled": true,
|
||||||
|
"fingerprint": "chrome"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packet_encoding":"xudp",
|
"type": "vless",
|
||||||
"multiplex":{
|
"uuid": "11391936-7544-4af5-ad02-e9f3970b1f64"
|
||||||
"enabled":false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"direct",
|
"tag": "direct",
|
||||||
"tag":"direct"
|
"type": "direct"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"dns",
|
"tag": "block",
|
||||||
"tag":"dns"
|
"type": "block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tag": "dns-out",
|
||||||
|
"type": "dns"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"route":{
|
"route": {
|
||||||
"geoip":{
|
"auto_detect_interface": true,
|
||||||
"download_url":"https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db",
|
"final": "proxy",
|
||||||
"download_detour":"vless-out"
|
"rule_set": [
|
||||||
},
|
|
||||||
"geosite":{
|
|
||||||
"download_url":"https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db",
|
|
||||||
"download_detour":"vless-out"
|
|
||||||
},
|
|
||||||
"rules":[
|
|
||||||
{
|
{
|
||||||
"protocol":"dns",
|
"download_detour": "proxy",
|
||||||
"outbound":"dns"
|
"format": "binary",
|
||||||
|
"tag": "geosite-geolocation-!cn",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"geoip":[
|
"download_detour": "proxy",
|
||||||
"private"
|
"format": "binary",
|
||||||
],
|
"tag": "geoip-cn",
|
||||||
"outbound":"direct"
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"download_detour": "proxy",
|
||||||
|
"format": "binary",
|
||||||
|
"tag": "geosite-cn",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"auto_detect_interface":true
|
"rules": [
|
||||||
|
{
|
||||||
|
"outbound": "dns-out",
|
||||||
|
"protocol": "dns"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network": "tcp",
|
||||||
|
"outbound": "block",
|
||||||
|
"port": 853
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"network": "udp",
|
||||||
|
"outbound": "block",
|
||||||
|
"port": [
|
||||||
|
443,
|
||||||
|
853
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mode": "and",
|
||||||
|
"outbound": "proxy",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"invert": true,
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-geolocation-!cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "logical"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mode": "and",
|
||||||
|
"outbound": "direct",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rule_set": "geosite-cn"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "logical"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"outbound": "direct",
|
||||||
|
"rule_set": "geoip-cn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ip_is_private": true,
|
||||||
|
"outbound": "direct"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -367,4 +490,4 @@ C:\Users\James\Desktop\Softwares\sing-box>sing-box run -c xray-ny-a-client.json
|
|||||||
-0500 2023-12-27 23:23:32 INFO [1067986987 0ms] inbound/tun[tun-in]: inbound packet connection from 172.28.0.1:58423
|
-0500 2023-12-27 23:23:32 INFO [1067986987 0ms] inbound/tun[tun-in]: inbound packet connection from 172.28.0.1:58423
|
||||||
-0500 2023-12-27 23:23:32 INFO [2253360887 0ms] inbound/tun[tun-in]: inbound connection from 172.28.0.1:60610
|
-0500 2023-12-27 23:23:32 INFO [2253360887 0ms] inbound/tun[tun-in]: inbound connection from 172.28.0.1:60610
|
||||||
-0500 2023-12-27 23:23:32 INFO outbound/vless[vless-out]: outbound packet connection to 1.1.1.1:53
|
-0500 2023-12-27 23:23:32 INFO outbound/vless[vless-out]: outbound packet connection to 1.1.1.1:53
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
url: https://github.com/KnowsCount
|
url: https://github.com/KnowsCount
|
||||||
description: I make computers beep-boop.
|
description: I make computers beep-boop.
|
||||||
- nickname: oenLN
|
- nickname: oenLN
|
||||||
avatar: https://halob.oneln.top/upload/jiayou.jpg
|
avatar: https://halo.oneln.org/logo.png
|
||||||
url: https://halob.oneln.top/
|
url: https://halo.oneln.org/
|
||||||
description: 时间就是力量
|
description: 时间就是力量,你的时间就是你的力量
|
||||||
Reference in New Issue
Block a user