variables {
iP = 157.255.78.51:443;
//cloudnproxy.baidu.com
//填你的cns服务器 服务器端口最好443
cns_server = cns:443;
//填你的cns服务器密码
cns_passwd = cns密码;
//以下内容不需要管
CNSP = "GET / [V]\r\nHost: m.toutiao.com\r\nMeng: [H]\r\n";
HTTP = "[M] http://[H_P][U] [V]\r\nHost: [H_P]\r\nX-T5-Auth: 88888888\r\nUser-Agent: baiduboxapp\r\n";
HTPS = "[M] [H] [V]\r\nHost: [H]\r\nX-T5-Auth: 88888888\r\nUser-Agent: baiduboxapp\r\n";
}
#######UDP部分########
httpUDP::udp {
udp_tproxy_listen = 0.0.0.0:6650;
udp_socks5_listen = 0.0.0.0:1081
destaddr = ${cns_server};
httpMod = cns;
encrypt = ${cns_passwd};
udp_flag = httpUDP;
}
tcp::Global {
tcp_listen = :::6650;
}
//HTTP模式
httpMod::http {
del_line = host;
del_line = User-Agent;
set_first = ${HTTP};
}
//HTTPS模式
httpMod::tunnel {
del_line = host;
set_first = ${HTPS};
}
//cns模式
httpMod::cns {
del_line = host;
set_first = ${CNSP};
}
tcpProxy::http_proxy {
//HTTP代理地址
destaddr = ${iP};
httpMod = http;
}
tcpProxy::https_proxy {
//HTTPS代理地址
destaddr = ${iP};
tunnelHttpMod = tunnel;
tunnel_proxy = on;
}
tcpProxy::cns_proxy {
//Cns代理地址
destAddr = ${cns_server};
tunnel_proxy = on;
tunnelHttpMod = cns;
tunnel_encrypt = ${cns_passwd};
}
//ssl端口先建立CONNECT连接
tcpAcl::firstConnect {
//这一句标识tcp三次握手后马上匹配
tcpProxy = https_proxy;
matchMode = firstMatch;
//读取数据后尝试匹配tcpAcl::http模块
reMatch = http;
dst_port = 8080;
dst_port = 443;
dst_port = 80;
}
//匹配普通http请求
tcpAcl::http {
tcpProxy = http_proxy;
continue: method != IS_NOT_HTTP|CONNECT;
reg_string != WebSocket;
}
//其他请求使用cns代理
tcpAcl::cns {
tcpProxy = cns_proxy;
dst_port != 8080;
dst_port != 443;
dst_port != 80;
}
dns::Global {
dns_listen = :::6653;
cachePath = /dev/null;
}
dnsAcl {
httpMod = http;
//HTTP代理地址
destaddr = ${iP};
header_host = 119.29.29.29;
query_type = A;
}
//用于接收socks5请求
socks5::recv_socks5 {
socks5_listen = 0.0.0.0:1081;
socks5_dns = 127.0.0.1:6653;
handshake_timeout = 60;
}
Tun {
tunAddr4 = 10.0.0.1;
//tunAddr6 = fc00::1;
tunMtu = 1500;
tunDevice = tunDev;
}
发布作者:
xxcyou
作品采用:
《
署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
》许可协议授权
—— 评论区 ——