/* 天翼云盘 */ variables { http_dst = 10.0.0.200:80; http_header = "[M] [U] [V]\r\n r\rHost:[H_P]\r\nHost:cloud.189.cn\r\n"; tunnel_dst = 10.0.0.200:80; tunnel_header = "[M] / [V]\r\n r\rHost:[H]\r\nHost:cloud.189.cn\r\n"; //二级代理,cns尽量443端口 cns_server = [服务器地址]:[服务器端口]; cns_passwd = [加密密码]; } #######UDP部分######## httpUDP::udp { udp_socks5_listen = [::]:10800; //udp_tproxy_listen = [::]:6650; destaddr = ${tunnel_dst}; httpMod = tunnel; header_host = ${cns_server}; encrypt = ${cns_passwd}; } tcp::Global { tcp_listen = :::6650; } tcpProxy::http_proxy_agent { //HTTP代理地址 destaddr = ${http_dst}; httpMod = http_agent; } tcpProxy::http_proxy { //HTTP代理地址 destaddr = ${http_dst}; httpMod = http; } //HTTP模式 httpMod::http_agent { del_line = host; set_first = ${http_header}; } httpMod::http { del_line = host; set_first = ${http_header}; } tcpProxy::https_proxy { //HTTPS代理地址 destaddr = ${tunnel_dst}; tunnelHttpMod = tunnel; tunnel_proxy = on; } //HTTPS模式 httpMod::tunnel { del_line = host; set_first = ${tunnel_header}; } //ssl端口先建立CONNECT连接 tcpAcl::firstConnect { tcpProxy = https_proxy; matchMode = firstMatch; //读取数据后尝试匹配tcpAcl::http模块 reMatch = http; continue: dst_port != 80; continue: dst_port != 8080; dst_port != 6650; } //匹配带有user-agent的普通http请求 tcpAcl::http_agent { tcpProxy = http_proxy_agent; continue: method != IS_NOT_HTTP|CONNECT; continue: reg_string != WebSocket; hdr_key(user-agent) = .; } //匹配普通http请求 tcpAcl::http { tcpProxy = http_proxy; continue: method != IS_NOT_HTTP|CONNECT; reg_string != WebSocket; } //其他请求使用CONNECT代理 tcpAcl::CONNECT { tcpProxy = https_proxy; dst_port != 0; } dns::Global { dns_listen = :::6653; } dnsAcl { httpMod = http; //HTTP代理地址 destaddr = ${http_dst}; header_host = 119.29.29.29; query_type = A; //query_type = AAAA; } //用于接收socks5请求 socks5::recv_socks5 { socks5_listen = 0.0.0.0:10800; socks5_dns = 127.0.0.1:6653; handshake_timeout = 60; } Tun { tunAddr4 = 10.0.0.1; tunAddr6 = fc00::1; tunMtu = 1500; tunDevice = tunDev; }