This commit is contained in:
arraykeys
2022-09-20 13:09:43 +08:00
parent 96d84d304a
commit e8494c83a9
8 changed files with 97 additions and 95 deletions
+18 -22
View File
@@ -1166,11 +1166,7 @@ Senat type judgment, easy to check whether the network supports p2p, you can exe
## 5.SOCKS5 Proxies ## 5.SOCKS5 Proxies
prompt: prompt:
SOCKS5 proxy, support CONNECT, UDP protocol, does not support BIND, supports username and password authentication. SOCKS5 proxy, support CONNECT, UDP protocol, does not support BIND, supports username and password authentication.
*** If your VPS is Alibaba Cloud, Tencent Cloud is a VPS, if ifconfig can't see your public IP, you can only see the intranet IP, ***
*** Then you need to add the `-g VPS public network IP` parameter, the UDP function of the SOCKS5 proxy can work normally. ***
***The udp function of socks5 is turned off by default, and can be turned on by `--udp`. The default is a random port for handshake, and performance can be improved by fixing a port. ***The udp function of socks5 is turned off by default, and can be turned on by `--udp`. The default is a random port for handshake, and performance can be improved by fixing a port.
Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. *** Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. ***
@@ -1268,10 +1264,6 @@ Secondary HTTP proxy (local Linux)
`proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword` `proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword`
Then access the local port 8080 is to access the proxy port 38080 on the VPS, the data is transmitted through the kcp protocol. Then access the local port 8080 is to access the proxy port 38080 on the VPS, the data is transmitted through the kcp protocol.
notice:
When using the kcp protocol locally, you need to specify the vps public network IP with -g, and the UDP function of socks5 is fully used. At this time, -g is the IP address in the UDP address returned to the client.
### 5.9. Custom DNS ### 5.9. Custom DNS
--dns-address and --dns-ttl parameters, used to specify the dns (--dns-address) used by the proxy to access the domain name. --dns-address and --dns-ttl parameters, used to specify the dns (--dns-address) used by the proxy to access the domain name.
And the analysis result cache time (--dns-ttl) seconds, to avoid system dns interference to the proxy, in addition to the cache function can also reduce the dns resolution time to improve access speed. And the analysis result cache time (--dns-ttl) seconds, to avoid system dns interference to the proxy, in addition to the cache function can also reduce the dns resolution time to improve access speed.
@@ -1437,10 +1429,6 @@ Listen port argument `-p` can be:
-p ":8081,:8082,:9000-9999" listen on 8081 and 8082 and 9000 and 9001 to 9999, 1002 total ports -p ":8081,:8082,:9000-9999" listen on 8081 and 8082 and 9000 and 9001 to 9999, 1002 total ports
``` ```
notice:
When using the kcp protocol locally, you need to specify the vps public network IP with -g, and the UDP function of socks5 is fully used. At this time, -g is the IP address in the UDP address returned to the client.
The udp function of ss is turned off by default and can be turned on by `--ssudp`. The udp function of socks5 is turned off by default and can be turned on by `--udp`, The default is a random port for handshake, and performance can be improved by fixing a port. The udp function of ss is turned off by default and can be turned on by `--ssudp`. The udp function of socks5 is turned off by default and can be turned on by `--udp`, The default is a random port for handshake, and performance can be improved by fixing a port.
Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port.
@@ -2058,23 +2046,31 @@ Then this problem can be solved through the control interface. The control inter
#### Request Description #### Request Description
The proxy sends an HTTP POST request to the control interface URL. There are two fields in the form data: user and ip. An HTTP POST request will be sent to the control. The interface `form` has three fields: interface, ip, conns, and the `conns` field requires a user whose proxy version is greater than proxy `12.2`.
user: the user name currently connected to the proxy, multiple are separated by commas, for example: user1, user2 `user` The username currently connected to the agent, multiple separated by commas, for example: user1, user2
`ip` The client IP is connected to the proxy, and multiple clients using English are split addresses, for example: 1.1.1.1, 2.2.2.2
ip: The IP address of the client currently connected to the proxy, multiple are separated by commas, for example: 1.1.1.1, 2.2.2.2 `conns` The tcp connection information currently connecting to the proxy port to transmit data. The conns value is a json string, the format is a sequence of connections, the element is an object, the object contains the details of the connection,
conns format: `[{"id":"ab7bf1f10501d6f7","client":"127.0.0.1:62112","server":"127.0.0.1:9092","user":""}]`
Object field description: id: connection id, client: client's unique IP address and port, server: client's IP and no port access, user's connection authentication (null if any)
#### Response Data Description #### Response Data Description
The data returned by the control interface is invalid user and IP, the format is a json object data, there are two fields user and ip. The data returned by the control interface is invalid user and IP or connection. The format is a json object data. There are three fields user, ip, and conns. The `conns` field requires the proxy version greater than or equal to `12.2`.
Format: `{"user":"a,b","ip":"",conns:["ab7bf1f10501d6f7","cb7bf1f10501d6f7"]}`
For example: {"user": "a, b", "ip": ""} `user`: The username currently connected to the proxy, multiple separated by commas, not left blank, for example: user1, user2
user: the user name currently connected to the proxy, multiple are separated by commas, not left blank, for example: user1, user2 `ip`: The ip address of the client currently connected to the proxy, multiple separated by commas, not left blank, for example: 1.1.1.1, 2.2.2.2
ip: The ip address of the client currently connected to the proxy. Multiple are separated by commas and not left blank. `conns`: is an array, the element is a connection id, this id is the id field of the connection object in conns in the above `Request Description`.
The connection between the returned user and ip will be disconnected by proxy. Introduce:
- The connection established by the returned user and ip will be disconnected by the proxy.
- Connections matching the returned conns will be disconnected by the proxy.
- If the returned data contains both: user or ip, and conns, then the user or ip will be ignored, and only the connection matching conns will be disconnected.
#### Example #### Example
Suppose --control-url `http://127.0.0.1:33088/user/control.php` points to a PHP interface address. Suppose --control-url `http://127.0.0.1:33088/user/control.php` points to a PHP interface address.
@@ -2093,7 +2089,7 @@ foreach ($userArr as $user) {
//logic business, push invalid user into $badUsers //logic business, push invalid user into $badUsers
$badUsers[]=$user; $badUsers[]=$user;
} }
$data=["user"=>implode(","$badUsers),"ip"=>""]; $data=["user"=>implode(","$badUsers),"ip"=>"","conns"=>[]];
echo json_encode($data); echo json_encode($data);
``` ```
+25 -20
View File
@@ -1274,10 +1274,6 @@ nat类型判断,方便查看网络是否支持p2p,可以执行:`proxy tools
SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码认证。 SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码认证。
***如果你的VPS是阿里云,腾讯云这种VPS,就是ifconfig看不见你的公网IP,只能看见内网IP,***
***那么需要加上`-g VPS公网IP`参数,SOCKS5代理的UDP功能才能正常工作。***
***socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。*** ***socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。***
### 5.1 普通SOCKS5代理 ### 5.1 普通SOCKS5代理
@@ -1365,16 +1361,12 @@ SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码
KCP协议需要--kcp-key参数设置一个密码用于加密解密数据 KCP协议需要--kcp-key参数设置一个密码用于加密解密数据
一级HTTP代理(VPSIP:22.22.22.22) 一级HTTP代理(VPSIP:22.22.22.22)
`proxy socks -t kcp -p ":38080" --kcp-key mypassword -g 22.22.22.22` `proxy socks -t kcp -p ":38080" --kcp-key mypassword`
二级HTTP代理(本地Linux) 二级HTTP代理(本地Linux)
`proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword` `proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword`
那么访问本地的8080端口就是访问VPS上面的代理端口38080,数据通过kcp协议传输。 那么访问本地的8080端口就是访问VPS上面的代理端口38080,数据通过kcp协议传输。
提示:
当本地使用kcp协议时,需要用-g指定vps公网IP,socks5的UDP功能才能正常使用.这时-g是返回给客户端的UDP地址中的IP地址.
### 5.9.自定义DNS ### 5.9.自定义DNS
--dns-address和--dns-ttl参数,用于自己指定proxy访问域名的时候使用的dns--dns-address --dns-address和--dns-ttl参数,用于自己指定proxy访问域名的时候使用的dns--dns-address
@@ -1562,8 +1554,6 @@ rc4-md5-6 salsa20 xchacha20
提示: 提示:
当本地使用kcp协议时,需要用-g指定vps公网IP,socks5的UDP功能才能正常使用.这时-g是返回给客户端的UDP地址中的IP地址.
ss的udp功能默认关闭,可以通过--ssudp开启。socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port ss的udp功能默认关闭,可以通过--ssudp开启。socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port
0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。
@@ -1817,6 +1807,11 @@ sps下级,限速100K
- 如果网卡IP发生变化,也会实时生效。 - 如果网卡IP发生变化,也会实时生效。
- 可以通过`--bind-refresh`参数,指定刷新本地网卡信息的间隔,默认`5`,单位秒。 - 可以通过`--bind-refresh`参数,指定刷新本地网卡信息的间隔,默认`5`,单位秒。
#### 提示
- sps提供的ss服务的udp功能不支持指定出口IP。
- sps提供的http(s)/socks5/ss均支持指定出口ip。
- sps提供的socks5的udp功能支持指定出口ip。
### 6.13 证书参数使用base64数据 ### 6.13 证书参数使用base64数据
默认情况下-C,-K参数是crt证书和key文件的路径, 默认情况下-C,-K参数是crt证书和key文件的路径,
@@ -2077,6 +2072,8 @@ proxy的http(s)/socks5/sps代理API功能,通过`--auth-url`和`--auth-nouser`
`sps` 代理是否是sps提供的,1:是,0:否。 `sps` 代理是否是sps提供的,1:是,0:否。
`target` 客户端要访问的目标,如果是http(s)代理,target是访问的具体url;如果是socks5代理,target是空。 `target` 客户端要访问的目标,如果是http(s)代理,target是访问的具体url;如果是socks5代理,target是空。
**客户端使用socks5的udp传输时,根据协议,服务端`proxy`会通过`--auth-url`认证两次,一次是tcp,一次是udp。**
#### 示例 #### 示例
假设--auth-url http://127.0.0.1:333/auth.php 指向了一个php接口地址. 假设--auth-url http://127.0.0.1:333/auth.php 指向了一个php接口地址.
@@ -2212,23 +2209,31 @@ proxy的http(s)/socks5/sps代理功能支持`控制接口`,可以通过参数`--
#### 控制接口请求说明 #### 控制接口请求说明
proxy会向控制接口URL发送一个HTTP POST请求,表单数据中有个字段:userip。 proxy会向控制接口URL发送一个HTTP POST请求,`表单`数据中有个字段:userip、conns`conns`这个字段需要proxy版本大于等于`12.2`才有
user:当前连接到proxy的用户名,多个使用英文逗号分割,比如:user1,user2 `user`:当前连接到proxy的用户名,多个使用英文逗号分割,比如:user1,user2
ip:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,比如:1.1.1.1,2.2.2.2 `ip`:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,比如:1.1.1.1,2.2.2.2
`conns`: 当前所有正在连接到代理端口传输数据的tcp连接信息。conns值是一个json字符串,格式是一个数组,元素是一个对象,对象包含了连接的详细详细,
conns格式:`[{"id":"ab7bf1f10501d6f7","client":"127.0.0.1:62112","server":"127.0.0.1:9092","user":""}]`
对象字段说明:id:连接的唯一id,client:客户端IP地址和端口,server:客户端访问的代理IP和端口,user连接对应认证的用户名(如果有的话,没有为空)
#### 控制接口返回数据说明 #### 控制接口返回数据说明
控制接口返回的数据是无效的用户和IP,格式是一个json对象数据,有个字段userip。 控制接口返回的数据是无效的用户和IP或者连接,格式是一个json对象数据,有个字段userip、conns`conns`这个字段需要proxy版本大于等于`12.2`才有
格式:`{"user":"a,b","ip":"",conns:["ab7bf1f10501d6f7","cb7bf1f10501d6f7"]}`
比如:{"user":"a,b","ip":""} `user`:当前连接到proxy的用户名,多个使用英文逗号分割,没有留空,比如:user1,user2
user:当前连接到proxy的用户名,多个使用英文逗号分割,没有留空,比如:user1,user2 `ip`:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,没有留空,比如:1.1.1.1,2.2.2.2
ip:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,没有留空,比如:1.1.1.1,2.2.2.2 `conns`:是一个数组,元素是一个连接的id,这个id是上面`控制接口请求说明`里面的conns里面的连接对象的id字段。
返回的用户和ip已经建立的连接会被proxy断开。 说明:
- 返回的用户和ip已经建立的连接会被proxy断开。
- 返回的conns匹配的连接会被proxy断开。
- 返回的数据,如果同时包含:user或者ip,和conns,那么user或者ip会被忽略,只会断开conns匹配的连接。
#### 示例 #### 示例
@@ -2248,7 +2253,7 @@ foreach ($userArr as $user) {
//逻辑判断用户$user是否无效,如果无效就放入$badUsers //逻辑判断用户$user是否无效,如果无效就放入$badUsers
$badUsers[]=$user; $badUsers[]=$user;
} }
$data=["user"=>implode(","$badUsers),"ip"=>""]; $data=["user"=>implode(","$badUsers),"ip"=>"","conns"=>[]];
echo json_encode($data); echo json_encode($data);
``` ```
+18 -22
View File
@@ -954,11 +954,7 @@ Senat type judgment, easy to check whether the network supports p2p, you can exe
## 5.SOCKS5 Proxies ## 5.SOCKS5 Proxies
prompt: prompt:
SOCKS5 proxy, support CONNECT, UDP protocol, does not support BIND, supports username and password authentication. SOCKS5 proxy, support CONNECT, UDP protocol, does not support BIND, supports username and password authentication.
*** If your VPS is Alibaba Cloud, Tencent Cloud is a VPS, if ifconfig can't see your public IP, you can only see the intranet IP, ***
*** Then you need to add the `-g VPS public network IP` parameter, the UDP function of the SOCKS5 proxy can work normally. ***
***The udp function of socks5 is turned off by default, and can be turned on by `--udp`. The default is a random port for handshake, and performance can be improved by fixing a port. ***The udp function of socks5 is turned off by default, and can be turned on by `--udp`. The default is a random port for handshake, and performance can be improved by fixing a port.
Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. *** Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. ***
@@ -1056,10 +1052,6 @@ Secondary HTTP proxy (local Linux)
`proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword` `proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword`
Then access the local port 8080 is to access the proxy port 38080 on the VPS, the data is transmitted through the kcp protocol. Then access the local port 8080 is to access the proxy port 38080 on the VPS, the data is transmitted through the kcp protocol.
notice:
When using the kcp protocol locally, you need to specify the vps public network IP with -g, and the UDP function of socks5 is fully used. At this time, -g is the IP address in the UDP address returned to the client.
### 5.9. Custom DNS ### 5.9. Custom DNS
--dns-address and --dns-ttl parameters, used to specify the dns (--dns-address) used by the proxy to access the domain name. --dns-address and --dns-ttl parameters, used to specify the dns (--dns-address) used by the proxy to access the domain name.
And the analysis result cache time (--dns-ttl) seconds, to avoid system dns interference to the proxy, in addition to the cache function can also reduce the dns resolution time to improve access speed. And the analysis result cache time (--dns-ttl) seconds, to avoid system dns interference to the proxy, in addition to the cache function can also reduce the dns resolution time to improve access speed.
@@ -1225,10 +1217,6 @@ Listen port argument `-p` can be:
-p ":8081,:8082,:9000-9999" listen on 8081 and 8082 and 9000 and 9001 to 9999, 1002 total ports -p ":8081,:8082,:9000-9999" listen on 8081 and 8082 and 9000 and 9001 to 9999, 1002 total ports
``` ```
notice:
When using the kcp protocol locally, you need to specify the vps public network IP with -g, and the UDP function of socks5 is fully used. At this time, -g is the IP address in the UDP address returned to the client.
The udp function of ss is turned off by default and can be turned on by `--ssudp`. The udp function of socks5 is turned off by default and can be turned on by `--udp`, The default is a random port for handshake, and performance can be improved by fixing a port. The udp function of ss is turned off by default and can be turned on by `--ssudp`. The udp function of socks5 is turned off by default and can be turned on by `--udp`, The default is a random port for handshake, and performance can be improved by fixing a port.
Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port. Set by parameter `--udp-port 0`, `0` represents a free port is randomly selected, or you can manually specify a specific port.
@@ -1846,23 +1834,31 @@ Then this problem can be solved through the control interface. The control inter
#### Request Description #### Request Description
The proxy sends an HTTP POST request to the control interface URL. There are two fields in the form data: user and ip. An HTTP POST request will be sent to the control. The interface `form` has three fields: interface, ip, conns, and the `conns` field requires a user whose proxy version is greater than proxy `12.2`.
user: the user name currently connected to the proxy, multiple are separated by commas, for example: user1, user2 `user` The username currently connected to the agent, multiple separated by commas, for example: user1, user2
`ip` The client IP is connected to the proxy, and multiple clients using English are split addresses, for example: 1.1.1.1, 2.2.2.2
ip: The IP address of the client currently connected to the proxy, multiple are separated by commas, for example: 1.1.1.1, 2.2.2.2 `conns` The tcp connection information currently connecting to the proxy port to transmit data. The conns value is a json string, the format is a sequence of connections, the element is an object, the object contains the details of the connection,
conns format: `[{"id":"ab7bf1f10501d6f7","client":"127.0.0.1:62112","server":"127.0.0.1:9092","user":""}]`
Object field description: id: connection id, client: client's unique IP address and port, server: client's IP and no port access, user's connection authentication (null if any)
#### Response Data Description #### Response Data Description
The data returned by the control interface is invalid user and IP, the format is a json object data, there are two fields user and ip. The data returned by the control interface is invalid user and IP or connection. The format is a json object data. There are three fields user, ip, and conns. The `conns` field requires the proxy version greater than or equal to `12.2`.
Format: `{"user":"a,b","ip":"",conns:["ab7bf1f10501d6f7","cb7bf1f10501d6f7"]}`
For example: {"user": "a, b", "ip": ""} `user`: The username currently connected to the proxy, multiple separated by commas, not left blank, for example: user1, user2
user: the user name currently connected to the proxy, multiple are separated by commas, not left blank, for example: user1, user2 `ip`: The ip address of the client currently connected to the proxy, multiple separated by commas, not left blank, for example: 1.1.1.1, 2.2.2.2
ip: The ip address of the client currently connected to the proxy. Multiple are separated by commas and not left blank. `conns`: is an array, the element is a connection id, this id is the id field of the connection object in conns in the above `Request Description`.
The connection between the returned user and ip will be disconnected by proxy. Introduce:
- The connection established by the returned user and ip will be disconnected by the proxy.
- Connections matching the returned conns will be disconnected by the proxy.
- If the returned data contains both: user or ip, and conns, then the user or ip will be ignored, and only the connection matching conns will be disconnected.
#### Example #### Example
Suppose --control-url `http://127.0.0.1:33088/user/control.php` points to a PHP interface address. Suppose --control-url `http://127.0.0.1:33088/user/control.php` points to a PHP interface address.
@@ -1881,7 +1877,7 @@ foreach ($userArr as $user) {
//logic business, push invalid user into $badUsers //logic business, push invalid user into $badUsers
$badUsers[]=$user; $badUsers[]=$user;
} }
$data=["user"=>implode(","$badUsers),"ip"=>""]; $data=["user"=>implode(","$badUsers),"ip"=>"","conns"=>[]];
echo json_encode($data); echo json_encode($data);
``` ```
+25 -20
View File
@@ -1048,10 +1048,6 @@ nat类型判断,方便查看网络是否支持p2p,可以执行:`proxy tools
SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码认证。 SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码认证。
***如果你的VPS是阿里云,腾讯云这种VPS,就是ifconfig看不见你的公网IP,只能看见内网IP,***
***那么需要加上`-g VPS公网IP`参数,SOCKS5代理的UDP功能才能正常工作。***
***socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。*** ***socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。***
### 5.1 普通SOCKS5代理 ### 5.1 普通SOCKS5代理
@@ -1139,16 +1135,12 @@ SOCKS5代理,支持CONNECTUDP协议,不支持BIND,支持用户名密码
KCP协议需要--kcp-key参数设置一个密码用于加密解密数据 KCP协议需要--kcp-key参数设置一个密码用于加密解密数据
一级HTTP代理(VPSIP:22.22.22.22) 一级HTTP代理(VPSIP:22.22.22.22)
`proxy socks -t kcp -p ":38080" --kcp-key mypassword -g 22.22.22.22` `proxy socks -t kcp -p ":38080" --kcp-key mypassword`
二级HTTP代理(本地Linux) 二级HTTP代理(本地Linux)
`proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword` `proxy socks -t tcp -p ":8080" -T kcp -P "22.22.22.22:38080" --kcp-key mypassword`
那么访问本地的8080端口就是访问VPS上面的代理端口38080,数据通过kcp协议传输。 那么访问本地的8080端口就是访问VPS上面的代理端口38080,数据通过kcp协议传输。
提示:
当本地使用kcp协议时,需要用-g指定vps公网IP,socks5的UDP功能才能正常使用.这时-g是返回给客户端的UDP地址中的IP地址.
### 5.9.自定义DNS ### 5.9.自定义DNS
--dns-address和--dns-ttl参数,用于自己指定proxy访问域名的时候使用的dns--dns-address --dns-address和--dns-ttl参数,用于自己指定proxy访问域名的时候使用的dns--dns-address
@@ -1336,8 +1328,6 @@ rc4-md5-6 salsa20 xchacha20
提示: 提示:
当本地使用kcp协议时,需要用-g指定vps公网IP,socks5的UDP功能才能正常使用.这时-g是返回给客户端的UDP地址中的IP地址.
ss的udp功能默认关闭,可以通过--ssudp开启。socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port ss的udp功能默认关闭,可以通过--ssudp开启。socks5的udp功能默认关闭,可以通过--udp开启,默认是握手随机端口,可以通过固定一个端口提高性能, 通过参数--udp-port
0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。 0设置,0代表随机选择一个空闲端口,也可以手动指定一个具体端口。
@@ -1591,6 +1581,11 @@ sps下级,限速100K
- 如果网卡IP发生变化,也会实时生效。 - 如果网卡IP发生变化,也会实时生效。
- 可以通过`--bind-refresh`参数,指定刷新本地网卡信息的间隔,默认`5`,单位秒。 - 可以通过`--bind-refresh`参数,指定刷新本地网卡信息的间隔,默认`5`,单位秒。
#### 提示
- sps提供的ss服务的udp功能不支持指定出口IP。
- sps提供的http(s)/socks5/ss均支持指定出口ip。
- sps提供的socks5的udp功能支持指定出口ip。
### 6.13 证书参数使用base64数据 ### 6.13 证书参数使用base64数据
默认情况下-C,-K参数是crt证书和key文件的路径, 默认情况下-C,-K参数是crt证书和key文件的路径,
@@ -1851,6 +1846,8 @@ proxy的http(s)/socks5/sps代理API功能,通过`--auth-url`和`--auth-nouser`
`sps` 代理是否是sps提供的,1:是,0:否。 `sps` 代理是否是sps提供的,1:是,0:否。
`target` 客户端要访问的目标,如果是http(s)代理,target是访问的具体url;如果是socks5代理,target是空。 `target` 客户端要访问的目标,如果是http(s)代理,target是访问的具体url;如果是socks5代理,target是空。
**客户端使用socks5的udp传输时,根据协议,服务端`proxy`会通过`--auth-url`认证两次,一次是tcp,一次是udp。**
#### 示例 #### 示例
假设--auth-url http://127.0.0.1:333/auth.php 指向了一个php接口地址. 假设--auth-url http://127.0.0.1:333/auth.php 指向了一个php接口地址.
@@ -1986,23 +1983,31 @@ proxy的http(s)/socks5/sps代理功能支持`控制接口`,可以通过参数`--
#### 控制接口请求说明 #### 控制接口请求说明
proxy会向控制接口URL发送一个HTTP POST请求,表单数据中有个字段:userip。 proxy会向控制接口URL发送一个HTTP POST请求,`表单`数据中有个字段:userip、conns`conns`这个字段需要proxy版本大于等于`12.2`才有
user:当前连接到proxy的用户名,多个使用英文逗号分割,比如:user1,user2 `user`:当前连接到proxy的用户名,多个使用英文逗号分割,比如:user1,user2
ip:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,比如:1.1.1.1,2.2.2.2 `ip`:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,比如:1.1.1.1,2.2.2.2
`conns`: 当前所有正在连接到代理端口传输数据的tcp连接信息。conns值是一个json字符串,格式是一个数组,元素是一个对象,对象包含了连接的详细详细,
conns格式:`[{"id":"ab7bf1f10501d6f7","client":"127.0.0.1:62112","server":"127.0.0.1:9092","user":""}]`
对象字段说明:id:连接的唯一id,client:客户端IP地址和端口,server:客户端访问的代理IP和端口,user连接对应认证的用户名(如果有的话,没有为空)
#### 控制接口返回数据说明 #### 控制接口返回数据说明
控制接口返回的数据是无效的用户和IP,格式是一个json对象数据,有个字段userip。 控制接口返回的数据是无效的用户和IP或者连接,格式是一个json对象数据,有个字段userip、conns`conns`这个字段需要proxy版本大于等于`12.2`才有
格式:`{"user":"a,b","ip":"",conns:["ab7bf1f10501d6f7","cb7bf1f10501d6f7"]}`
比如:{"user":"a,b","ip":""} `user`:当前连接到proxy的用户名,多个使用英文逗号分割,没有留空,比如:user1,user2
user:当前连接到proxy的用户名,多个使用英文逗号分割,没有留空,比如:user1,user2 `ip`:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,没有留空,比如:1.1.1.1,2.2.2.2
ip:当前连接到proxy的客户端ip地址,多个使用英文逗号分割,没有留空,比如:1.1.1.1,2.2.2.2 `conns`:是一个数组,元素是一个连接的id,这个id是上面`控制接口请求说明`里面的conns里面的连接对象的id字段。
返回的用户和ip已经建立的连接会被proxy断开。 说明:
- 返回的用户和ip已经建立的连接会被proxy断开。
- 返回的conns匹配的连接会被proxy断开。
- 返回的数据,如果同时包含:user或者ip,和conns,那么user或者ip会被忽略,只会断开conns匹配的连接。
#### 示例 #### 示例
@@ -2022,7 +2027,7 @@ foreach ($userArr as $user) {
//逻辑判断用户$user是否无效,如果无效就放入$badUsers //逻辑判断用户$user是否无效,如果无效就放入$badUsers
$badUsers[]=$user; $badUsers[]=$user;
} }
$data=["user"=>implode(","$badUsers),"ip"=>""]; $data=["user"=>implode(","$badUsers),"ip"=>"","conns"=>[]];
echo json_encode($data); echo json_encode($data);
``` ```
+6 -6
View File
@@ -17,12 +17,6 @@
<lastmod>2019-06-14T16:29:13+08:00</lastmod> <lastmod>2019-06-14T16:29:13+08:00</lastmod>
</url> </url>
<url>
<loc>https://snail007.host900.com/goproxy/tags/cdn/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url> <url>
<loc>https://snail007.host900.com/goproxy/categories/</loc> <loc>https://snail007.host900.com/goproxy/categories/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod> <lastmod>2019-07-05T08:20:48+08:00</lastmod>
@@ -47,6 +41,12 @@
<priority>0</priority> <priority>0</priority>
</url> </url>
<url>
<loc>https://snail007.host900.com/goproxy/tags/cdn/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url> <url>
<loc>https://snail007.host900.com/goproxy/tags/cloudflare/</loc> <loc>https://snail007.host900.com/goproxy/tags/cloudflare/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod> <lastmod>2019-07-05T08:20:48+08:00</lastmod>
+2 -2
View File
@@ -14,7 +14,7 @@
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css">
<title>CDN - GOPROXY IN ACTION</title> <title>cdn - GOPROXY IN ACTION</title>
<link href="https://snail007.host900.com/goproxy/css/styles.css" rel="stylesheet"> <link href="https://snail007.host900.com/goproxy/css/styles.css" rel="stylesheet">
@@ -77,7 +77,7 @@
<header class="page-header"> <header class="page-header">
<h1>CDN</h1> <h1>cdn</h1>
</header> </header>
+2 -2
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>CDN on GOPROXY IN ACTION</title> <title>cdn on GOPROXY IN ACTION</title>
<link>https://snail007.host900.com/goproxy/tags/cdn/</link> <link>https://snail007.host900.com/goproxy/tags/cdn/</link>
<description>Recent content in CDN on GOPROXY IN ACTION</description> <description>Recent content in cdn on GOPROXY IN ACTION</description>
<generator>Hugo -- gohugo.io</generator> <generator>Hugo -- gohugo.io</generator>
<language>zh-CN</language> <language>zh-CN</language>
<lastBuildDate>Fri, 05 Jul 2019 08:20:48 +0800</lastBuildDate> <lastBuildDate>Fri, 05 Jul 2019 08:20:48 +0800</lastBuildDate>
+1 -1
View File
@@ -12,7 +12,7 @@
<item> <item>
<title>CDN</title> <title>cdn</title>
<link>https://snail007.host900.com/goproxy/tags/cdn/</link> <link>https://snail007.host900.com/goproxy/tags/cdn/</link>
<pubDate>Fri, 05 Jul 2019 08:20:48 +0800</pubDate> <pubDate>Fri, 05 Jul 2019 08:20:48 +0800</pubDate>