我使用$$-windows作为本地socks服务器。【Windows的通用应用的loopback限制已使用Enable AppContainer Loopback解除】。
maple版本:0.5.0/0.4.0
在maple中,配置.conf文件,配置如下:
[General]
# Log are for debug only
loglevel = error
# Do not remove tun-fd option
tun-fd = 233
dns-server = 223.5.5.5, 114.114.114.114
[Proxy]
Direct = direct
Reject = reject
Sock_local_1080 = sock, 127.0.0.1, 1080
[Proxy Group]
# fallback 等效于 failover
Fallback = fallback, Sock_local_1080, interval=600, timeout=5
# url-test 等效于 failover=false 的 failover
UrlTest = url-test, Sock_local_1080, interval=600, timeout=5
Failover = failover, Sock_local_1080, health-check=true, check-interval=600, fail-timeout=5, failover=true
Tryall = tryall, Sock_local_1080, delay-base=0
Random = random, Sock_local_1080
[Rule]
# 代理服务器
DOMAIN-SUFFIX, my.proxy.server.domain, Direct
# 执行文件目录当中必需有 `site.dat` 文件
EXTERNAL, site:category-ads-all, Reject
# Arbitrary file access is forbidden within an app container.
# Make sure `geosite.dat` exists in the config folder.
# 也可以指定 `dat` 文件所在路径
EXTERNAL, site:geosite.dat:category-ads-all, Reject
IP-CIDR, 8.8.8.8/32, Fallback
DOMAIN, www.google.com, Fallback
DOMAIN-SUFFIX, google.com, Fallback
DOMAIN-KEYWORD, google, Fallback
# 等效于 EXTERNAL, mmdb:cn, Direct
GEOIP, cn, Direct
EXTERNAL, site:geolocation-cn, Direct
FINAL, Fallback
[Host]
# 对指定域名返回一个或多个静态 IP
example.com = 192.168.0.1, 192.168.0.2
也使用过json,但是似乎也无法使用。.json配置文件如下:
{
"log": {
"level": "error"
},
"dns": {
"servers": [
"223.5.5.5",
"8.8.8.8",
"8.8.4.4"
],
"hosts": {
"localhost": [
"127.0.0.1"
]
}
},
"inbounds": [
{
"protocol": "tun",
"settings": {
"name": "utun8",
"address": "10.10.0.2",
"netmask": "255.255.255.0",
"gateway": "10.10.0.1",
"mtu": 1500,
"fakeDnsInclude": [
"google"
]
},
"tag": "tun_in"
}
],
"outbounds": [
{
"protocol": "failover",
"settings": {
"actors": [
"my.proxy.server.domain:12345_out",
"localhost:1080_out"
],
"failTimeout": 4,
"healthCheck": true,
"checkInterval": 300,
"failover": true,
"fallbackCache": false,
"cacheSize": 256,
"cacheTimeout": 60
},
"tag": "failover_out"
},
{
"protocol": "chain",
"settings": {
"actors": [
"ss_tls",
"ss_ws",
"my.proxy.server.domain:12345"
]
},
"tag": "my.proxy.server.domain:123456_out"
},
{
"protocol": "tls",
"tag": "ss_tls"
},
{
"protocol": "ws",
"settings": {
"path": "/"
},
"tag": "ss_ws"
},
{
"protocol": "shadowsocks",
"settings": {
"address": "my.proxy.server.domain",
"method": "aes-128-gcm",
"password": "passwd",
"port": 12345
},
"tag": "my.proxy.server.domain:12345"
},
{
"protocol": "socks",
"settings": {
"address": "127.0.0.1",
"port": 1080
},
"tag": "localhost:1080_out"
},
{
"protocol": "direct",
"tag": "direct_out"
},
{
"protocol": "drop",
"tag": "drop_out"
}
],
"rules": [
{
"ip": [
"8.8.8.8",
"8.8.4.4"
],
"target": "failover_out"
},
{
"domain": [
"www.google.com"
],
"target": "failover_out"
},
{
"domainSuffix": [
"my.proxy.server.domain"
],
"target": "direct_out"
},
{
"domainSuffix": [
"google.com",
"goo.gl",
"goo.gle",
"cloudflare.com"
],
"target": "failover_out"
},
{
"domainKeyword": [
"metax"
],
"target": "direct_out"
},
{
"domainKeyword": [
"google",
"github"
],
"target": "failover_out"
},
{
"geoip": [
"cn"
],
"target": "direct_out"
},
{
"geoip": [
"us",
"jp"
],
"target": "failover_out"
},
{
"external": [
"site:cn"
],
"target": "direct_out"
},
{
"external": [
"site:us",
"site:jp"
],
"target": "failover_out"
},
{
"external": [
"mmdb:cn"
],
"target": "direct_out"
},
{
"external": [
"mmdb:us"
],
"target": "failover_out"
}
]
}
我使用$$-windows作为本地socks服务器。【Windows的通用应用的loopback限制已使用Enable AppContainer Loopback解除】。
maple版本:0.5.0/0.4.0
在maple中,配置.conf文件,配置如下:
也使用过json,但是似乎也无法使用。.json配置文件如下:
{ "log": { "level": "error" }, "dns": { "servers": [ "223.5.5.5", "8.8.8.8", "8.8.4.4" ], "hosts": { "localhost": [ "127.0.0.1" ] } }, "inbounds": [ { "protocol": "tun", "settings": { "name": "utun8", "address": "10.10.0.2", "netmask": "255.255.255.0", "gateway": "10.10.0.1", "mtu": 1500, "fakeDnsInclude": [ "google" ] }, "tag": "tun_in" } ], "outbounds": [ { "protocol": "failover", "settings": { "actors": [ "my.proxy.server.domain:12345_out", "localhost:1080_out" ], "failTimeout": 4, "healthCheck": true, "checkInterval": 300, "failover": true, "fallbackCache": false, "cacheSize": 256, "cacheTimeout": 60 }, "tag": "failover_out" }, { "protocol": "chain", "settings": { "actors": [ "ss_tls", "ss_ws", "my.proxy.server.domain:12345" ] }, "tag": "my.proxy.server.domain:123456_out" }, { "protocol": "tls", "tag": "ss_tls" }, { "protocol": "ws", "settings": { "path": "/" }, "tag": "ss_ws" }, { "protocol": "shadowsocks", "settings": { "address": "my.proxy.server.domain", "method": "aes-128-gcm", "password": "passwd", "port": 12345 }, "tag": "my.proxy.server.domain:12345" }, { "protocol": "socks", "settings": { "address": "127.0.0.1", "port": 1080 }, "tag": "localhost:1080_out" }, { "protocol": "direct", "tag": "direct_out" }, { "protocol": "drop", "tag": "drop_out" } ], "rules": [ { "ip": [ "8.8.8.8", "8.8.4.4" ], "target": "failover_out" }, { "domain": [ "www.google.com" ], "target": "failover_out" }, { "domainSuffix": [ "my.proxy.server.domain" ], "target": "direct_out" }, { "domainSuffix": [ "google.com", "goo.gl", "goo.gle", "cloudflare.com" ], "target": "failover_out" }, { "domainKeyword": [ "metax" ], "target": "direct_out" }, { "domainKeyword": [ "google", "github" ], "target": "failover_out" }, { "geoip": [ "cn" ], "target": "direct_out" }, { "geoip": [ "us", "jp" ], "target": "failover_out" }, { "external": [ "site:cn" ], "target": "direct_out" }, { "external": [ "site:us", "site:jp" ], "target": "failover_out" }, { "external": [ "mmdb:cn" ], "target": "direct_out" }, { "external": [ "mmdb:us" ], "target": "failover_out" } ] }