/*
    普通免流   例子，只需要修改HTTP/HTTPS代理IP跟模式(可作为wap模式)
*/

#######UDP部分########
httpUDP::udp {
    //如果搭建了cns服务器可以删除下面的//(尽量搭建443端口)
    //udp_socks5_listen = 0.0.0.0:1081
    //udp_tproxy_listen = 0.0.0.0:6650;
    //destaddr = 180.97.93.202:443;
    httpMod = tunnel;
    encrypt = 加密密码;
    header_host = 服务器IP:服务器端口;
}


tcp::Global {
    tcp_listen = :::6650;
}

//HTTPS模式
httpMod::tunnel {
    del_line = host;
    set_first = "[M] [H] [V]\r\nHost: [H]\r\nX-T5-Auth: 1967948331\r\nUser-Agent: okhttp/3.11.0 Dalvik/2.1.0 Mozilla/5.0 (Linux; Android 10; V2061A Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.73 Mobile Safari/537.36 (#Build; vivo; V2061A; QP1A.190711.020 release-keys; 10) +CoolMarket/12.1-2203161-universal baiduboxapp/11.0.5.12 (Baidu; P1 11)\r\n";
}
//HTTP模式
httpMod::http {
    del_line = host;
    set_first = "[M] http://[H_P][U] [V]\r\nHost: [H_P]\r\nX-T5-Auth: 1967948331\r\nUser-Agent: okhttp/3.11.0 Dalvik/2.1.0 Mozilla/5.0 (Linux; Android 10; V2061A Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.73 Mobile Safari/537.36 (#Build; vivo; V2061A; QP1A.190711.020 release-keys; 10) +CoolMarket/12.1-2203161-universal baiduboxapp/11.0.5.12 (Baidu; P1 11)\r\n";
}

tcpProxy::http_proxy {
    //HTTPS代理地址
    destaddr = 180.97.93.202:443;
    httpMod = http;
}
tcpProxy::https_proxy {
    //HTTPS代理地址
    destaddr = 180.97.93.202:443;
    tunnelHttpMod = tunnel;
    tunnel_proxy = httpOverTunnel;
}

//ssl端口先建立CONNECT连接
tcpAcl::firstConnect {
    tcpProxy = https_proxy;
    matchMode = firstMatch;
    //读取数据后尝试匹配tcpAcl::http模块
    reMatch = http;

    continue: dst_port != 80;
    continue: dst_port != 8080;
    dst_port != 6650;
}
//匹配普通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;
    cachePath = /dev/null;
}
dnsAcl {
    httpMod = http;
    //HTTP代理地址
    destaddr = 180.97.93.202:443;
    header_host = 119.29.29.29;
    query_type = A;
    query_type = AAAA;
}
dnsAcl {
    destaddr = 180.97.93.202:443;
    header_host = 39.106.194.18:44558;
    lookup_mode = tcpdns;
    tunnel_proxy = on;
    tunnelHttpMod = tunnel;
}


//用于接收socks5请求
socks5::recv_socks5 {
    socks5_listen = 0.0.0.0:1081;
    socks5_dns = 127.0.0.1:6653;
    handshake_timeout = 60;
}