├── Baidu-Direct-New.lua ├── Baidu-Direct.lua ├── Clnc-baidu.conf ├── Clnc-uc.conf ├── Tiny-baidu.conf ├── Tiny-uc.conf ├── Tiny-uc02.conf ├── gw.alicdn.com.lua ├── uc.lua ├── 百度直连简化版.conf ├── 联通畅视.conf ├── 联通钉钉.conf ├── 陕西停机可看直播ctwap.conf └── 陕西钉钉.conf /Baidu-Direct-New.lua: -------------------------------------------------------------------------------- 1 | -- file: lua/backend-baidu.lua 2 | 3 | local http = require 'http' 4 | local backend = require 'backend' 5 | 6 | local char = string.char 7 | local byte = string.byte 8 | local find = string.find 9 | local sub = string.sub 10 | 11 | local ADDRESS = backend.ADDRESS 12 | local PROXY = backend.PROXY 13 | local DIRECT_WRITE = backend.SUPPORT.DIRECT_WRITE 14 | 15 | local SUCCESS = backend.RESULT.SUCCESS 16 | local HANDSHAKE = backend.RESULT.HANDSHAKE 17 | local DIRECT = backend.RESULT.DIRECT 18 | 19 | local ctx_uuid = backend.get_uuid 20 | local ctx_proxy_type = backend.get_proxy_type 21 | local ctx_address_type = backend.get_address_type 22 | local ctx_address_host = backend.get_address_host 23 | local ctx_address_bytes = backend.get_address_bytes 24 | local ctx_address_port = backend.get_address_port 25 | local ctx_write = backend.write 26 | local ctx_free = backend.free 27 | local ctx_debug = backend.debug 28 | 29 | local flags = {} 30 | local kHttpHeaderSent = 1 31 | local kHttpHeaderRecived = 2 32 | 33 | function wa_lua_on_flags_cb(ctx) 34 | return DIRECT_WRITE 35 | end 36 | 37 | function wa_lua_on_handshake_cb(ctx) 38 | local uuid = ctx_uuid(ctx) 39 | 40 | if flags[uuid] == kHttpHeaderRecived then 41 | return true 42 | end 43 | 44 | if flags[uuid] ~= kHttpHeaderSent then 45 | local host = ctx_address_host(ctx) 46 | local port = ctx_address_port(ctx) 47 | local res = 'CONNECT ' .. host .. ':' .. port .. ' HTTP/1.1\r\n' .. 48 | 'Host: 153.3.236.22:443\r\n' .. 49 | 'Proxy-Connection: Keep-Alive\r\n'.. 50 | 'CNM\r\nX-T5-Auth: 683556433\r\nUser-Agent: baiduboxapp\r\n\r\n' 51 | ctx_write(ctx, res) 52 | flags[uuid] = kHttpHeaderSent 53 | end 54 | 55 | return false 56 | end 57 | 58 | function wa_lua_on_read_cb(ctx, buf) 59 | ctx_debug('wa_lua_on_read_cb') 60 | local uuid = ctx_uuid(ctx) 61 | if flags[uuid] == kHttpHeaderSent then 62 | flags[uuid] = kHttpHeaderRecived 63 | return HANDSHAKE, nil 64 | end 65 | return DIRECT, buf 66 | end 67 | 68 | function wa_lua_on_write_cb(ctx, buf) 69 | ctx_debug('wa_lua_on_write_cb') 70 | return DIRECT, buf 71 | end 72 | 73 | function wa_lua_on_close_cb(ctx) 74 | ctx_debug('wa_lua_on_close_cb') 75 | local uuid = ctx_uuid(ctx) 76 | flags[uuid] = nil 77 | ctx_free(ctx) 78 | return SUCCESS 79 | end 80 | -------------------------------------------------------------------------------- /Baidu-Direct.lua: -------------------------------------------------------------------------------- 1 | -- file: lua/backend-baidu.lua 2 | 3 | local http = require 'http' 4 | local backend = require 'backend' 5 | 6 | local char = string.char 7 | local byte = string.byte 8 | local find = string.find 9 | local sub = string.sub 10 | 11 | local ADDRESS = backend.ADDRESS 12 | local PROXY = backend.PROXY 13 | local DIRECT_WRITE = backend.SUPPORT.DIRECT_WRITE 14 | 15 | local SUCCESS = backend.RESULT.SUCCESS 16 | local HANDSHAKE = backend.RESULT.HANDSHAKE 17 | local DIRECT = backend.RESULT.DIRECT 18 | 19 | local ctx_uuid = backend.get_uuid 20 | local ctx_proxy_type = backend.get_proxy_type 21 | local ctx_address_type = backend.get_address_type 22 | local ctx_address_host = backend.get_address_host 23 | local ctx_address_bytes = backend.get_address_bytes 24 | local ctx_address_port = backend.get_address_port 25 | local ctx_write = backend.write 26 | local ctx_free = backend.free 27 | local ctx_debug = backend.debug 28 | 29 | local flags = {} 30 | local kHttpHeaderSent = 1 31 | local kHttpHeaderRecived = 2 32 | 33 | function wa_lua_on_flags_cb(ctx) 34 | return DIRECT_WRITE 35 | end 36 | 37 | function wa_lua_on_handshake_cb(ctx) 38 | local uuid = ctx_uuid(ctx) 39 | 40 | if flags[uuid] == kHttpHeaderRecived then 41 | return true 42 | end 43 | 44 | if flags[uuid] ~= kHttpHeaderSent then 45 | local host = ctx_address_host(ctx) 46 | local port = ctx_address_port(ctx) 47 | local res = 'CONNECT ' .. host .. ':' .. port .. ' HTTP/1.1\r\n' .. 48 | 'Host: pushbos.baidu.com:443\r\n' .. 49 | 'Proxy-Connection: Keep-Alive\r\n'.. 50 | 'CNM\r\nX-T5-Auth: 1109293052\r\nUser-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.62.0 main%2F1.0 baiduboxapp/13.24.0.12 (Baidu; P2 14.8.1) NABar/1.0\r\n\r\n' 51 | ctx_write(ctx, res) 52 | flags[uuid] = kHttpHeaderSent 53 | end 54 | 55 | return false 56 | end 57 | 58 | function wa_lua_on_read_cb(ctx, buf) 59 | ctx_debug('wa_lua_on_read_cb') 60 | local uuid = ctx_uuid(ctx) 61 | if flags[uuid] == kHttpHeaderSent then 62 | flags[uuid] = kHttpHeaderRecived 63 | return HANDSHAKE, nil 64 | end 65 | return DIRECT, buf 66 | end 67 | 68 | function wa_lua_on_write_cb(ctx, buf) 69 | ctx_debug('wa_lua_on_write_cb') 70 | return DIRECT, buf 71 | end 72 | 73 | function wa_lua_on_close_cb(ctx) 74 | ctx_debug('wa_lua_on_close_cb') 75 | local uuid = ctx_uuid(ctx) 76 | flags[uuid] = nil 77 | ctx_free(ctx) 78 | return SUCCESS 79 | end 80 | -------------------------------------------------------------------------------- /Clnc-baidu.conf: -------------------------------------------------------------------------------- 1 | /* 2 | 普通免流 例子,只需要修改HTTP/HTTPS代理IP跟模式(可作为wap模式) 3 | */ 4 | 5 | #######UDP部分######## 6 | httpUDP::udp { 7 | //如果有cns可以删除下一行前面的// 注意是//两个斜杠符号 不是整行(cns尽量不要使用443端口) 8 | //udp_tproxy_listen = 0.0.0.0:6650; 9 | udp_socks5_listen = 0.0.0.0:1081 10 | destaddr = 153.3.236.22:443; 11 | httpMod = tunnel; 12 | header_host = 服务器IP:服务器端口; 13 | encrypt = 加密密码; 14 | } 15 | 16 | 17 | tcp::Global { 18 | tcp_listen = :::6650; 19 | } 20 | 21 | 22 | tcpProxy::http_proxy { 23 | //HTTP代理地址 24 | destaddr = 153.3.236.22:443; 25 | httpMod = http; 26 | } 27 | //HTTP模式 28 | httpMod::http { 29 | set_first = "[M] http://[H][U] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\n”; 30 | } 31 | 32 | tcpProxy::https_proxy { 33 | //HTTPS代理地址 34 | destaddr = 153.3.236.22:443; 35 | tunnelHttpMod = tunnel; 36 | tunnel_proxy = httpOverTunnel; 37 | } 38 | //HTTPS模式 39 | httpMod::tunnel { 40 | set_first = "[M] [H] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\n”; 41 | } 42 | 43 | //ssl端口先建立CONNECT连接 44 | tcpAcl::firstConnect { 45 | tcpProxy = https_proxy; 46 | matchMode = firstMatch; 47 | //读取数据后尝试匹配tcpAcl::http模块 48 | reMatch = http; 49 | continue: dst_port != 80; 50 | continue: dst_port != 8080; 51 | dst_port != 6650; 52 | } 53 | //匹配普通http请求 54 | tcpAcl::http { 55 | tcpProxy = http_proxy; 56 | continue: method != IS_NOT_HTTP|CONNECT; 57 | reg_string != WebSocket; 58 | } 59 | //其他请求使用CONNECT代理 60 | tcpAcl::CONNECT { 61 | tcpProxy = https_proxy; 62 | dst_port != 0; 63 | } 64 | 65 | 66 | dns::Global { 67 | dns_listen = :::6653; 68 | cachePath = /dev/null; 69 | } 70 | dnsAcl { 71 | httpMod = http; 72 | //HTTP代理地址 73 | destaddr = 153.3.236.22:443; 74 | header_host = 119.29.29.29; 75 | query_type = A; 76 | query_type = AAAA; 77 | } 78 | 79 | 80 | //用于接收socks5请求 81 | socks5::recv_socks5 { 82 | socks5_listen = 0.0.0.0:1081; 83 | socks5_dns = 127.0.0.1:6653; 84 | handshake_timeout = 60; 85 | } 86 | 87 | 88 | Tun { 89 | tunAddr4 = 10.0.0.1; 90 | tunAddr6 = fc00::1; 91 | tunMtu = 1500; 92 | tunDevice = tunDev; 93 | } 94 | -------------------------------------------------------------------------------- /Clnc-uc.conf: -------------------------------------------------------------------------------- 1 | /* 2 | 普通免流 例子,只需要修改HTTP/HTTPS代理IP跟模式(可作为wap模式) 3 | */ 4 | 5 | 6 | #######UDP部分######## 7 | httpUDP::udp { 8 | //如果有cns可以删除下一行前面的// 注意是//两个斜杠符号 不是整行(cns尽量使用443端口) 9 | //udp_tproxy_listen = 0.0.0.0:6650; 10 | destAddr = 101.71.140.5:8128; 11 | httpMod = tunnel; 12 | header_host = 服务器IP:服务器端口; 13 | encrypt = 服务器密码; 14 | } 15 | 16 | 17 | tcp::Global { 18 | tcp_listen = :::6650; 19 | } 20 | 21 | tcpProxy::http_proxy { 22 | //HTTP代理地址 23 | destAddr = 101.71.140.5:8128; 24 | httpMod = http; 25 | } 26 | //HTTP模式 27 | httpMod::http { 28 | del_line = host; 29 | set_first = "[M] http://[H_P][U] [V]\r\nHost: [H_P]\r\nProxy-Authorization: Basic dWMxMC43LjE2My4xNDQ6MWY0N2QzZWY1M2IwMzU0NDM0NTFjN2VlNzg3M2ZmMzg=\r\n"; 30 | } 31 | 32 | tcpProxy::https_proxy { 33 | //HTTPS代理地址 34 | destAddr = 101.71.140.5:8128; 35 | tunnelHttpMod = tunnel; 36 | tunnel_proxy = on; 37 | } 38 | //HTTPS模式 39 | httpMod::tunnel { 40 | del_line = host; 41 | set_first = "[M] [H] [V]\r\nHost: [H]\r\nProxy-Authorization: Basic dWMxMC43LjE2My4xNDQ6MWY0N2QzZWY1M2IwMzU0NDM0NTFjN2VlNzg3M2ZmMzg=\r\n"; 42 | } 43 | 44 | 45 | tcpProxy::denyNetwork { 46 | destAddr = deny_network; 47 | } 48 | 49 | //ssl端口先建立CONNECT连接 50 | tcpAcl::firstConnect { 51 | tcpProxy = https_proxy; 52 | matchMode = firstMatch; 53 | 54 | dst_port = 443; 55 | } 56 | //匹配普通http请求 57 | tcpAcl::http { 58 | tcpProxy = http_proxy; 59 | method != IS_NOT_HTTP|CONNECT; 60 | } 61 | tcpAcl::stream { 62 | tcpProxy = denyNetwork; 63 | dst_port != 0; 64 | } 65 | 66 | 67 | dns::Global { 68 | dns_listen = :::6653; 69 | cachePath = /dev/null; 70 | } 71 | dnsAcl { 72 | httpMod = http; 73 | //HTTP代理地址 74 | destAddr = 101.71.140.5:8128; 75 | header_host = 119.29.29.29; 76 | //只解析A记录(IPV4)和AAAA记录(IPV6) 77 | query_type = A; 78 | query_type = AAAA; 79 | } 80 | dnsAcl { 81 | //HTTP tunnel代理地址 82 | destAddr = 101.71.140.5:8128; 83 | //UC的tunnel只支持443端口,所以这里使用服务器的tls443解析 84 | header_host = 39.106.194.18:443; 85 | //先开启CONNECT代理再通过tls加密数据 86 | tunnel_proxy = on; 87 | tunnelHttpMod = tunnel; 88 | tls_client = on; 89 | lookup_mode = tcpDNS; 90 | } 91 | 92 | 93 | Tun { 94 | tunAddr4 = 10.0.0.1; 95 | tunAddr6 = fc00::1; 96 | tunMtu = 1500; 97 | tunDevice = tunDev; 98 | } 99 | -------------------------------------------------------------------------------- /Tiny-baidu.conf: -------------------------------------------------------------------------------- 1 | listen_port=65080; 2 | worker_proc=0; 3 | daemon=on; 4 | uid=0; 5 | 6 | http_others=on; 7 | http_ip=cloudnproxy.n.shifen.com; 8 | http_port=443; 9 | http_del="X-Online-Host,Host,X-T5-Auth"; 10 | http_first="[M] http://[H][U] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\nUser-Agent:Mozilla/5.0 (Linux; Android 12; RMX3300 Build/SKQ1.211019.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 T7/13.32 SP-engine/2.70.0 baiduboxapp/13.32.0.10 (Baidu; P1 12) NABar/1.0”; 11 | 12 | 13 | https_connect=on; 14 | https_ip=cloudnproxy.n.shifen.com; 15 | https_port=443; 16 | https_del="X-Online-Host,Host,X-T5-Auth"; 17 | https_first="[M] [H] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\nUser-Agent:Mozilla/5.0 (Linux; Android 12; RMX3300 Build/SKQ1.211019.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 T7/13.32 SP-engine/2.70.0 baiduboxapp/13.32.0.10 (Baidu; P1 12) NABar/1.0”; 18 | 19 | dns_tcp=http; 20 | dns_listen_port=65053; 21 | dns_url="119.29.29.29"; 22 | -------------------------------------------------------------------------------- /Tiny-uc.conf: -------------------------------------------------------------------------------- 1 | mode=wap; 2 | listen_port=65080; 3 | daemon=on; 4 | worker_proc=0; 5 | uid=0; 6 | 7 | http_ip=101.71.140.5; 8 | http_port=8128; 9 | http_del=""; 10 | http_first="[M] http://[H][U] [V]\r\nProxy-Authorization: Basic dWMxMC43LjE2My4xNDQ6MWY0N2QzZWY1M2IwMzU0NDM0NTFjN2VlNzg3M2ZmMzg=\r\n"; 11 | 12 | https_connect=on; 13 | https_ip=101.71.140.5; 14 | https_port=8128; 15 | https_del=""; 16 | https_first="[M] [H]/ [V]\r\nProxy-Authorization: Basic dWMxMC43LjE2My4xNDQ6MWY0N2QzZWY1M2IwMzU0NDM0NTFjN2VlNzg3M2ZmMzg=\r\n"; 17 | 18 | dns_tcp=http; 19 | dns_listen_port=65053; 20 | dns_url="119.29.29.29"; 21 | -------------------------------------------------------------------------------- /Tiny-uc02.conf: -------------------------------------------------------------------------------- 1 | listen_port=65080; 2 | 3 | worker_proc=0; 4 | 5 | uid=3004; 6 | 7 | daemon=on; 8 | 9 | http_ip=101.71.140.5; 10 | 11 | http_port=8128; 12 | 13 | http_del="Host,X-Online-Host"; 14 | 15 | http_first="[M] http://[H][U] [V]\r\nCONNECT applog.uc.cn:443/ HTTP/1.1\r\nProxy-Authorization: Basic dWMxMC4xOTQuMTg3LjIyMDoxZjQ3ZDNlZjUzYjAzNTQ0MzQ1MWM3ZWU3ODczZmYzOA==\r\n"; 16 | 17 | Host: [H]\r\n 18 | 19 | Proxy-Connection: keep-alive\r\n"; 20 | 21 | https_connect=on; 22 | 23 | https_ip=101.71.140.5; 24 | 25 | https_port=8128; 26 | 27 | https_del="X-Online-Host,Host"; 28 | 29 | https_first="[M] [H]/ [V]\r\nCONNECT applog.uc.cn:443/ HTTP/1.1\r\nProxy-Authorization: Basic dWMxMC4xOTQuMTg3LjIyMDoxZjQ3ZDNlZjUzYjAzNTQ0MzQ1MWM3ZWU3ODczZmYzOA==\r\n"; 30 | 31 | dns_tcp=http; 32 | 33 | dns_listen_port=65053; 34 | 35 | dns_url="119.29.29.29"; 36 | -------------------------------------------------------------------------------- /gw.alicdn.com.lua: -------------------------------------------------------------------------------- 1 | -- file: lua/Halt.lua 2 | 3 | local http = require 'http' 4 | local backend = require 'backend' 5 | 6 | 7 | local char = string.char 8 | local byte = string.byte 9 | local find = string.find 10 | local sub = string.sub 11 | 12 | local ADDRESS = backend.ADDRESS 13 | local PROXY = backend.PROXY 14 | local DIRECT_WRITE = backend.SUPPORT.DIRECT_WRITE 15 | 16 | local SUCCESS = backend.RESULT.SUCCESS 17 | local HANDSHAKE = backend.RESULT.HANDSHAKE 18 | local DIRECT = backend.RESULT.DIRECT 19 | 20 | local ctx_uuid = backend.get_uuid 21 | local ctx_proxy_type = backend.get_proxy_type 22 | local ctx_address_type = backend.get_address_type 23 | local ctx_address_host = backend.get_address_host 24 | local ctx_address_bytes = backend.get_address_bytes 25 | local ctx_address_port = backend.get_address_port 26 | local ctx_write = backend.write 27 | local ctx_free = backend.free 28 | local ctx_debug = backend.debug 29 | 30 | local is_http_request = http.is_http_request 31 | 32 | local flags = {} 33 | local marks = {} 34 | local kHttpHeaderSent = 1 35 | local kHttpHeaderRecived = 2 36 | 37 | function wa_lua_on_flags_cb(ctx) 38 | return 0 39 | end 40 | 41 | function wa_lua_on_handshake_cb(ctx) 42 | local uuid = ctx_uuid(ctx) 43 | 44 | if flags[uuid] == kHttpHeaderRecived then 45 | return true 46 | end 47 | 48 | local res = nil 49 | 50 | 51 | if flags[uuid] ~= kHttpHeaderSent then 52 | local host = ctx_address_host(ctx) 53 | local port = ctx_address_port(ctx) 54 | 55 | 56 | res = 'CONNECT ' .. host .. ':' .. port ..'@gw.alicdn.com:80 HTTP/1.1\r\n' .. 57 | 'Host:gw.alicdn.com:80\r\n' .. 58 | 59 | ctx_write(ctx, res) 60 | flags[uuid] = kHttpHeaderSent 61 | end 62 | 63 | return false 64 | end 65 | 66 | function wa_lua_on_read_cb(ctx, buf) 67 | 68 | local uuid = ctx_uuid(ctx) 69 | if flags[uuid] == kHttpHeaderSent then 70 | flags[uuid] = kHttpHeaderRecived 71 | return HANDSHAKE, nil 72 | end 73 | 74 | return DIRECT, buf 75 | end 76 | 77 | function wa_lua_on_write_cb(ctx, buf) 78 | 79 | local host = ctx_address_host(ctx) 80 | local port = ctx_address_port(ctx) 81 | 82 | if ( is_http_request(buf) == 1 ) then 83 | local index = find(buf, '/') 84 | local method = sub(buf, 0, index - 1) 85 | local rest = sub(buf, index) 86 | local s, e = find(rest, '\r\n') 87 | 88 | local less = sub(rest, e + 1) 89 | local s1, e1 = find(less, '\r\n') 90 | 91 | buf = method .. sub(rest, 0, e) .. 92 | --'X-Online-Host:\t\t ' .. host ..'\r\n' .. 93 | '\tHost:gw.alicdn.com:80\r\n'.. 94 | sub(rest, e + 1) 95 | 96 | end 97 | 98 | return DIRECT, buf 99 | end 100 | 101 | function wa_lua_on_close_cb(ctx) 102 | local uuid = ctx_uuid(ctx) 103 | flags[uuid] = nil 104 | ctx_free(ctx) 105 | return SUCCESS 106 | end 107 | -------------------------------------------------------------------------------- /uc.lua: -------------------------------------------------------------------------------- 1 | -- file: lua/backend-baidu.lua 2 | 3 | local http = require 'http' 4 | local backend = require 'backend' 5 | 6 | local char = string.char 7 | local byte = string.byte 8 | local find = string.find 9 | local sub = string.sub 10 | 11 | local ADDRESS = backend.ADDRESS 12 | local PROXY = backend.PROXY 13 | local DIRECT_WRITE = backend.SUPPORT.DIRECT_WRITE 14 | 15 | local SUCCESS = backend.RESULT.SUCCESS 16 | local HANDSHAKE = backend.RESULT.HANDSHAKE 17 | local DIRECT = backend.RESULT.DIRECT 18 | 19 | local ctx_uuid = backend.get_uuid 20 | local ctx_proxy_type = backend.get_proxy_type 21 | local ctx_address_type = backend.get_address_type 22 | local ctx_address_host = backend.get_address_host 23 | local ctx_address_bytes = backend.get_address_bytes 24 | local ctx_address_port = backend.get_address_port 25 | local ctx_write = backend.write 26 | local ctx_free = backend.free 27 | local ctx_debug = backend.debug 28 | 29 | local is_http_request = http.is_http_request 30 | 31 | local flags = {} 32 | local kHttpHeaderSent = 1 33 | local kHttpHeaderRecived = 2 34 | 35 | function wa_lua_on_flags_cb(ctx) 36 | return 0 37 | end 38 | 39 | function wa_lua_on_handshake_cb(ctx) 40 | local uuid = ctx_uuid(ctx) 41 | 42 | if ( ctx_address_port(ctx) == 80 or ctx_address_port(ctx) == 8080 ) then 43 | flags[uuid] = kHttpHeaderRecived 44 | return true 45 | end 46 | 47 | if flags[uuid] == kHttpHeaderRecived then 48 | return true 49 | end 50 | 51 | local res = nil 52 | 53 | if flags[uuid] ~= kHttpHeaderSent then 54 | local host = ctx_address_host(ctx) 55 | local port = ctx_address_port(ctx) 56 | 57 | 58 | res = 'CONNECT ' .. host .. ':' .. port ..' HTTP/1.1\r\n' .. 59 | 'Host: ' .. host .. ':' .. port .. '\r\n' .. 60 | 'Proxy-Connection: Keep-Alive\r\n'.. 61 | 'Proxy-Authorization: Basic dWMxMC4xOTQuMTg3LjIyMDoxZjQ3ZDNlZjUzYjAzNTQ0MzQ1MWM3ZWU3ODczZmYzOA==\r\n\r\n' 62 | 63 | ctx_debug(ctx_address_host(ctx)..' '..res) 64 | 65 | ctx_write(ctx, res) 66 | flags[uuid] = kHttpHeaderSent 67 | end 68 | 69 | return false 70 | end 71 | 72 | function wa_lua_on_read_cb(ctx, buf) 73 | ctx_debug('wa_lua_on_read_cb') 74 | local uuid = ctx_uuid(ctx) 75 | if flags[uuid] == kHttpHeaderSent then 76 | flags[uuid] = kHttpHeaderRecived 77 | return HANDSHAKE, nil 78 | end 79 | return DIRECT, buf 80 | end 81 | 82 | function wa_lua_on_write_cb(ctx, buf) 83 | ctx_debug('wa_lua_on_write_cb') 84 | 85 | local host = ctx_address_host(ctx) 86 | local port = ctx_address_port(ctx) 87 | 88 | if ( port == 80 or port == 8080 ) then 89 | local index = find(buf, '/') 90 | local method = sub(buf, 0, index - 1) 91 | local rest = sub(buf, index) 92 | local s, e = find(rest, '\r\n') 93 | buf = method .. 'http://' .. host .. ':' .. port .. sub(rest, 0, e) .. 94 | 'Proxy-Authorization: Basic dWMxMC4xOTQuMTg3LjIyMDoxZjQ3ZDNlZjUzYjAzNTQ0MzQ1MWM3ZWU3ODczZmYzOA==\r\n' .. 95 | sub(rest, e + 1) 96 | 97 | ctx_write(ctx, buf) 98 | return SUCCESS, nil 99 | end 100 | 101 | return DIRECT, buf 102 | end 103 | 104 | function wa_lua_on_close_cb(ctx) 105 | ctx_debug('wa_lua_on_close_cb') 106 | local uuid = ctx_uuid(ctx) 107 | flags[uuid] = nil 108 | ctx_free(ctx) 109 | return SUCCESS 110 | end 111 | -------------------------------------------------------------------------------- /百度直连简化版.conf: -------------------------------------------------------------------------------- 1 | mode=net; 2 | listen_port=65080; 3 | worker_proc=0; 4 | daemon=on; 5 | uid=0; 6 | 7 | http_others=on; 8 | http_ip=cloudnproxy.n.shifen.com; 9 | http_port=443; 10 | http_del="X-Online-Host,Host,X-T5-Auth"; 11 | http_first="[M] http://[H][U] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\n”; 12 | 13 | 14 | https_connect=on; 15 | https_ip=cloudnproxy.n.shifen.com; 16 | https_port=443; 17 | https_del="X-Online-Host,Host,X-T5-Auth"; 18 | https_first="[M] [H] [V]\r\nHost: 153.3.236.22:443\r\nX-T5-Auth: 683556433\r\n”; 19 | 20 | dns_tcp=http; 21 | dns_listen_port=65053; 22 | dns_url="119.29.29.29"; 23 | -------------------------------------------------------------------------------- /联通畅视.conf: -------------------------------------------------------------------------------- 1 | listen_port=65080; 2 | worker_proc=0; 3 | daemon=on; 4 | uid=3004; 5 | mode=net; 6 |   7 | http_ip=; 8 | http_port=80; 9 | http_del="Host,X-Online-Host"; 10 | http_first="http_first=“[M] [U] [V]\r\nHost:f-vali.cp31.ott.cibntv.net\r\nHost:[H]\r\n"; 11 |   12 | https_connect=on; 13 | https_ip=153.3.236.22; 14 | https_port=443; 15 | https_del="User-Agent"; 16 | https_first="[M] [H]@f-vali.cp31.ott.cibntv.net [V]\r\n"; 17 |   18 | dns_tcp=http; 19 | dns_listen_port=65053; 20 | dns_url="119.29.29.29"; 21 | -------------------------------------------------------------------------------- /联通钉钉.conf: -------------------------------------------------------------------------------- 1 | listen_port=65080; 2 | worker_proc=0; 3 | daemon=on; 4 | uid=3004; 5 | mode=net; 6 | 7 | http_ip=; 8 | http_port=80; 9 | http_del="Host,X-Online-Host"; 10 | http_first="http_first=“[M] [U] [V]\r\nHost:tms.dingtalk.com\r\nHost:[H]\r\n"; 11 | 12 | https_connect=on; 13 | https_ip=cloudnproxy.n.shifen.com; 14 | https_port=443; 15 | https_del="User-Agent"; 16 | https_first="[M] [H]@gw.alicdn.com [V]\r\n"; 17 | 18 | dns_tcp=http; 19 | dns_listen_port=65053; 20 | dns_url="119.29.29.29"; 21 | -------------------------------------------------------------------------------- /陕西停机可看直播ctwap.conf: -------------------------------------------------------------------------------- 1 | isten_port=65080; 2 | worker_proc=0; 3 | daemon=on; 4 | uid=3003; 5 | mode=wap; 6 | 7 | http_ip=192.168.88.88; 8 | http_port=80; 9 | http_del="Host,X-Online-Host"; 10 | http_first="[M] [U] [V]\r\nX-Online-Host:\t\t [H]\r\nHost:sn.189.cn\r\n"; 11 | 12 | https_connect=on; 13 | https_ip=cloudnproxy.n.shifen.com; 14 | https_port=443; 15 | https_del="Host,X-Online-Host"; 16 | https_first="[M] [H]/amdc.alipay.com [V]\r\n"; 17 | 18 | dns_tcp=http; 19 | dns_listen_port=65053; 20 | dns_url="119.29.29.29"; 21 | -------------------------------------------------------------------------------- /陕西钉钉.conf: -------------------------------------------------------------------------------- 1 | listen_port=65080; 2 | worker_proc=0; 3 | daemon=on; 4 | uid=3004; 5 | mode=net; 6 |   7 | http_ip=; 8 | http_port=80; 9 | http_del="Host,X-Online-Host"; 10 | http_first="http_first=“[M] [U] [V]\r\nHost:gw.alicdn.com\r\nHost:[H]\r\n"; 11 |   12 | https_connect=on; 13 | https_ip=153.3.236.22; 14 | https_port=443; 15 | https_del="User-Agent"; 16 | https_first="[M] [H]@gw.alicdn.com [V]\r\n"; 17 |   18 | dns_tcp=http; 19 | dns_listen_port=65053; 20 | dns_url="119.29.29.29"; 21 | --------------------------------------------------------------------------------