mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-21 08:52:43 +08:00
更新README.md,添加SOCKS5默认激活说明;修复代理IP解析逻辑以支持URL解码
This commit is contained in:
@@ -230,8 +230,8 @@
|
|||||||
```url
|
```url
|
||||||
/socks5=user:password@127.0.0.1:1080
|
/socks5=user:password@127.0.0.1:1080
|
||||||
/?socks5=user:password@127.0.0.1:1080
|
/?socks5=user:password@127.0.0.1:1080
|
||||||
/socks://dXNlcjpwYXNzd29yZA==@127.0.0.1:1080
|
/socks://dXNlcjpwYXNzd29yZA==@127.0.0.1:1080 (默认激活全局SOCKS5)
|
||||||
/socks5://user:password@127.0.0.1:1080
|
/socks5://user:password@127.0.0.1:1080 (默认激活全局SOCKS5)
|
||||||
```
|
```
|
||||||
|
|
||||||
5. **当你的`ADDAPI`可作为`PROXYIP`时,可在`ADDAPI`变量末位添加`?proxyip=true`,即可在生成节点时使用优选IP自身作为`PROXYIP`**
|
5. **当你的`ADDAPI`可作为`PROXYIP`时,可在`ADDAPI`变量末位添加`?proxyip=true`,即可在生成节点时使用优选IP自身作为`PROXYIP`**
|
||||||
|
|||||||
3
明文源码.js
3
明文源码.js
@@ -213,11 +213,12 @@ export default {
|
|||||||
else if (new RegExp('/socks://', 'i').test(url.pathname) || new RegExp('/socks5://', 'i').test(url.pathname)) {
|
else if (new RegExp('/socks://', 'i').test(url.pathname) || new RegExp('/socks5://', 'i').test(url.pathname)) {
|
||||||
socks5Address = url.pathname.split('://')[1].split('#')[0];
|
socks5Address = url.pathname.split('://')[1].split('#')[0];
|
||||||
if (socks5Address.includes('@')) {
|
if (socks5Address.includes('@')) {
|
||||||
let userPassword = socks5Address.split('@')[0];
|
let userPassword = socks5Address.split('@')[0].replaceAll('%3D', '=');
|
||||||
const base64Regex = /^(?:[A-Z0-9+/]{4})*(?:[A-Z0-9+/]{2}==|[A-Z0-9+/]{3}=)?$/i;
|
const base64Regex = /^(?:[A-Z0-9+/]{4})*(?:[A-Z0-9+/]{2}==|[A-Z0-9+/]{3}=)?$/i;
|
||||||
if (base64Regex.test(userPassword) && !userPassword.includes(':')) userPassword = atob(userPassword);
|
if (base64Regex.test(userPassword) && !userPassword.includes(':')) userPassword = atob(userPassword);
|
||||||
socks5Address = `${userPassword}@${socks5Address.split('@')[1]}`;
|
socks5Address = `${userPassword}@${socks5Address.split('@')[1]}`;
|
||||||
}
|
}
|
||||||
|
go2Socks5s = ['all in'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socks5Address) {
|
if (socks5Address) {
|
||||||
|
|||||||
Reference in New Issue
Block a user