Modifying process UID functionality

This commit is contained in:
2019-09-02 21:27:20 +08:00
parent 2e8e4e3f7b
commit fc04a60511
8 changed files with 67 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
[server]
PORT=9606;
PID_FILE=log/cproxy.pid;
uid=3004;
local_port=9606;
pid_file=log/cproxy.pid;
[http]
http_ip=10.0.0.172;
@@ -16,4 +17,3 @@ https_del=",Host";
https_first="[M] iread.wo.cn//https://[host]:[port]#iread.wo.cn [V]\r\nhost: iread.wo.cn:443\r\n";
strrep = "Mi MIX 2->Linux";
regrep = "Host*.+?->Host: iread.wo.cn:443";

View File

@@ -1,18 +1,30 @@
模块: [server], [http], [https]
[server]模块
PORT 端口
PID_FILE pid文件
[http]、[https]模块关键字: [M], [U], [V], [host], [port], \r, \n, \v, \f, \b, \t, \a. 如果原本请求头含有关键字也会被替换.
[server]模块
uid 设置UID
local_port 端口
pid_file pid文件
[http]模块
[M] 原请求方法
[U] 原请求url
[V] 原请求协议版本
[host] 原请求host
[port] 原请求端口
关键字strrep替换字符串指令.
strrep = "Mi MIX 2->Linux"; 以"->"为分界符,"Mi MIX 2"字符串替换为"Linux"字符串.
关键字regrep正则匹配替换字符串.
regrep = "Host*.+?->Host: iread.wo.cn:443"; 以"->"为分界符,匹配到的内容"Host*.+?"替换为"Host: iread.wo.cn:443"字符串.
[https]模块
[M] 原请求方法
[U] 原请求url
[V] 原请求协议版本
[host] 原请求host
[port] 原请求端口
关键字strrep替换字符串指令.
strrep = "Mi MIX 2->Linux"; 以"->"为分界符,"Mi MIX 2"字符串替换为"Linux"字符串.
关键字regrep正则匹配替换字符串.
regrep = "Host*.+?->Host: iread.wo.cn:443"; 以"->"为分界符,匹配到的内容"Host*.+?"替换为"Host: iread.wo.cn:443"字符串.

View File

@@ -0,0 +1,21 @@
[server]
uid=3004;
local_port=9606;
pid_file=log/cproxy.pid;
[http]
http_ip=10.0.0.172;
http_port=80;
http_del="x-online-host,X-Online-Host,host,Host";
;http_first="[M] [U] [V]\r\n.aixiao.me\rx-online-host: [host]\r\nhost: iread.wo.cn\r\n";
http_first="[M] [U] [V]\r\nhost: [host]:[port]\r\n";
;strrep = "Mi MIX 2->Linux";
[https]
https_ip=10.0.0.172;
https_port=80;
https_del=",Host";
;https_first="[M] iread.wo.cn//https://[host]:[port]#iread.wo.cn [V]\r\nhost: iread.wo.cn:443\r\n";
https_first="[M] [U] [V]\r\nhost: [host]:[port]\r\n";
;strrep = "Mi MIX 2->Linux";
;regrep = "Host*.+?->Host: iread.wo.cn:443";