/* 普通免流 例子,只需要修改HTTP/HTTPS代理IP跟模式(可作为wap模式) */ variables { http_dst = 153.3.236.22:443; http_header = "[M] http://[H_P][U] [V]\r\nHost: [H_P]\r\nUser-Agent: use_value(User-Agent) baiduboxapp\r\n"; tunnel_dst = 153.3.236.22:443; tunnel_header = "[M] [H] [V]\r\nHost: [H]\r\nUser-Agent: use_value(User-Agent) baiduboxapp\r\n"; cns_header = "GET / [V]\r\nHost: dm.toutiao.com\r\nMeng: [H]\r\n"; cns_server = sz.ycaiw.cn:8089; cns_passwd = 2333; } #######UDP部分######## httpUDP::udp { //如果使用cns服务器请删除下面的斜杠 //udp_socks5_listen = 0.0.0.0:1081 udp_tproxy_listen = 0.0.0.0:6650; destaddr = ${cns_server}; httpMod = tunnelcns; encrypt = ${cns_passwd}; //这个header_host随便写,他会在httpMod上被修改掉。 header_host = 6.6.6.6:80; udp_flag = httpUDP; } tcp::Global {> tcp_listen = :::6650; } //HTTP模式 httpMod::http { del_line = host; set_first = ${http_header}; } //HTTPS模式 httpMod::tunnel { del_line = host; set_first = ${tunnel_header}; } //cns模式 httpMod::tunnelcns { del_line = host; set_first = ${cns_header}; } tcpProxy::http_proxy { //HTTP代理地址 destaddr = ${http_dst}; httpMod = http; } tcpProxy::https_proxy { //HTTPS代理地址 destaddr = ${tunnel_dst}; tunnelHttpMod = tunnel; tunnel_proxy = on; } tcpProxy::cns_proxy { //Cns代理地址 destAddr = ${cns_server}; tunnel_proxy = on; tunnelHttpMod = tunnelcns; tunnel_encrypt = ${cns_passwd}; } //ssl端口先建立CONNECT连接 tcpAcl::firstConnect { //这一句标识tcp三次握手后马上匹配 tcpProxy = https_proxy; matchMode = firstMatch; //读取数据后尝试匹配tcpAcl::http模块 reMatch = http; dst_port = 443; } //匹配普通http请求 tcpAcl::http { tcpProxy = http_proxy; dst_port = 80; dst_port = 8080; continue: method != IS_NOT_HTTP|CONNECT; reg_string != WebSocket; } //其他请求使用cns代理 tcpAcl::cns { tcpProxy = cns_proxy; continue: dst_port != 80; continue: dst_port != 443; continue: dst_port != 8080; } dns::Global { dns_listen = :::6653; cachePath = /dev/null; } 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:1081; // socks5_dns = 127.0.0.1:6653; // handshake_timeout = 60; //} Tun { tunAddr4 = 10.0.0.1; //tunAddr6 = fc00::1; tunMtu = 1500; tunDevice = tunDev; }