diff --git a/database/model/model.go b/database/model/model.go
index 7d0a977c..856f66df 100644
--- a/database/model/model.go
+++ b/database/model/model.go
@@ -12,11 +12,11 @@ type Protocol string
const (
VMESS Protocol = "vmess"
VLESS Protocol = "vless"
- DOKODEMO Protocol = "dokodemo-door"
+ Tunnel Protocol = "tunnel"
HTTP Protocol = "http"
Trojan Protocol = "trojan"
Shadowsocks Protocol = "shadowsocks"
- Socks Protocol = "socks"
+ Mixed Protocol = "mixed"
WireGuard Protocol = "wireguard"
)
diff --git a/sub/default.json b/sub/default.json
index fff1b3ad..59c8a5ce 100644
--- a/sub/default.json
+++ b/sub/default.json
@@ -13,7 +13,7 @@
"inbounds": [
{
"port": 10808,
- "protocol": "socks",
+ "protocol": "mixed",
"settings": {
"auth": "noauth",
"udp": true,
@@ -28,7 +28,7 @@
],
"enabled": true
},
- "tag": "socks"
+ "tag": "mixed"
},
{
"port": 10809,
diff --git a/web/assets/js/model/dbinbound.js b/web/assets/js/model/dbinbound.js
index acb62ce4..1added25 100644
--- a/web/assets/js/model/dbinbound.js
+++ b/web/assets/js/model/dbinbound.js
@@ -49,8 +49,8 @@ class DBInbound {
return this.protocol === Protocols.SHADOWSOCKS;
}
- get isSocks() {
- return this.protocol === Protocols.SOCKS;
+ get isMixed() {
+ return this.protocol === Protocols.MIXED;
}
get isHTTP() {
diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js
index c2467c36..ee9e74c0 100644
--- a/web/assets/js/model/inbound.js
+++ b/web/assets/js/model/inbound.js
@@ -3,8 +3,8 @@ const Protocols = {
VLESS: 'vless',
TROJAN: 'trojan',
SHADOWSOCKS: 'shadowsocks',
- DOKODEMO: 'dokodemo-door',
- SOCKS: 'socks',
+ TUNNEL: 'tunnel',
+ MIXED: 'mixed',
HTTP: 'http',
WIREGUARD: 'wireguard',
};
@@ -1712,8 +1712,8 @@ Inbound.Settings = class extends XrayCommonClass {
case Protocols.VLESS: return new Inbound.VLESSSettings(protocol);
case Protocols.TROJAN: return new Inbound.TrojanSettings(protocol);
case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings(protocol);
- case Protocols.DOKODEMO: return new Inbound.DokodemoSettings(protocol);
- case Protocols.SOCKS: return new Inbound.SocksSettings(protocol);
+ case Protocols.TUNNEL: return new Inbound.TunnelSettings(protocol);
+ case Protocols.MIXED: return new Inbound.MixedSettings(protocol);
case Protocols.HTTP: return new Inbound.HttpSettings(protocol);
case Protocols.WIREGUARD: return new Inbound.WireguardSettings(protocol);
default: return null;
@@ -1726,8 +1726,8 @@ Inbound.Settings = class extends XrayCommonClass {
case Protocols.VLESS: return Inbound.VLESSSettings.fromJson(json);
case Protocols.TROJAN: return Inbound.TrojanSettings.fromJson(json);
case Protocols.SHADOWSOCKS: return Inbound.ShadowsocksSettings.fromJson(json);
- case Protocols.DOKODEMO: return Inbound.DokodemoSettings.fromJson(json);
- case Protocols.SOCKS: return Inbound.SocksSettings.fromJson(json);
+ case Protocols.TUNNEL: return Inbound.TunnelSettings.fromJson(json);
+ case Protocols.MIXED: return Inbound.MixedSettings.fromJson(json);
case Protocols.HTTP: return Inbound.HttpSettings.fromJson(json);
case Protocols.WIREGUARD: return Inbound.WireguardSettings.fromJson(json);
default: return null;
@@ -2327,7 +2327,7 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
};
-Inbound.DokodemoSettings = class extends Inbound.Settings {
+Inbound.TunnelSettings = class extends Inbound.Settings {
constructor(
protocol,
address,
@@ -2345,8 +2345,8 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
}
static fromJson(json = {}) {
- return new Inbound.DokodemoSettings(
- Protocols.DOKODEMO,
+ return new Inbound.TunnelSettings(
+ Protocols.TUNNEL,
json.address,
json.port,
XrayCommonClass.toHeaders(json.portMap),
@@ -2366,8 +2366,8 @@ Inbound.DokodemoSettings = class extends Inbound.Settings {
}
};
-Inbound.SocksSettings = class extends Inbound.Settings {
- constructor(protocol, auth = 'password', accounts = [new Inbound.SocksSettings.SocksAccount()], udp = false, ip = '127.0.0.1') {
+Inbound.MixedSettings = class extends Inbound.Settings {
+ constructor(protocol, auth = 'password', accounts = [new Inbound.MixedSettings.SocksAccount()], udp = false, ip = '127.0.0.1') {
super(protocol);
this.auth = auth;
this.accounts = accounts;
@@ -2387,11 +2387,11 @@ Inbound.SocksSettings = class extends Inbound.Settings {
let accounts;
if (json.auth === 'password') {
accounts = json.accounts.map(
- account => Inbound.SocksSettings.SocksAccount.fromJson(account)
+ account => Inbound.MixedSettings.SocksAccount.fromJson(account)
)
}
- return new Inbound.SocksSettings(
- Protocols.SOCKS,
+ return new Inbound.MixedSettings(
+ Protocols.MIXED,
json.auth,
accounts,
json.udp,
@@ -2408,7 +2408,7 @@ Inbound.SocksSettings = class extends Inbound.Settings {
};
}
};
-Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass {
+Inbound.MixedSettings.SocksAccount = class extends XrayCommonClass {
constructor(user = RandomUtil.randomSeq(10), pass = RandomUtil.randomSeq(10)) {
super();
this.user = user;
@@ -2416,7 +2416,7 @@ Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass {
}
static fromJson(json = {}) {
- return new Inbound.SocksSettings.SocksAccount(json.user, json.pass);
+ return new Inbound.MixedSettings.SocksAccount(json.user, json.pass);
}
};
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index 2d5660fb..e798ddc1 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -6,7 +6,7 @@ const Protocols = {
VLESS: "vless",
Trojan: "trojan",
Shadowsocks: "shadowsocks",
- Socks: "socks",
+ Mixed: "mixed",
HTTP: "http",
Wireguard: "wireguard"
};
@@ -643,7 +643,7 @@ class Outbound extends CommonClass {
Protocols.Trojan,
Protocols.Shadowsocks,
Protocols.HTTP,
- Protocols.Socks
+ Protocols.Mixed
].includes(this.protocol);
}
@@ -652,7 +652,7 @@ class Outbound extends CommonClass {
}
hasServers() {
- return [Protocols.Trojan, Protocols.Shadowsocks, Protocols.Socks, Protocols.HTTP].includes(this.protocol);
+ return [Protocols.Trojan, Protocols.Shadowsocks, Protocols.Mixed, Protocols.HTTP].includes(this.protocol);
}
hasAddressPort() {
@@ -662,13 +662,13 @@ class Outbound extends CommonClass {
Protocols.VLESS,
Protocols.Trojan,
Protocols.Shadowsocks,
- Protocols.Socks,
+ Protocols.Mixed,
Protocols.HTTP
].includes(this.protocol);
}
hasUsername() {
- return [Protocols.Socks, Protocols.HTTP].includes(this.protocol);
+ return [Protocols.Mixed, Protocols.HTTP].includes(this.protocol);
}
static fromJson(json = {}) {
@@ -847,7 +847,7 @@ Outbound.Settings = class extends CommonClass {
case Protocols.VLESS: return new Outbound.VLESSSettings();
case Protocols.Trojan: return new Outbound.TrojanSettings();
case Protocols.Shadowsocks: return new Outbound.ShadowsocksSettings();
- case Protocols.Socks: return new Outbound.SocksSettings();
+ case Protocols.Mixed: return new Outbound.MixedSettings();
case Protocols.HTTP: return new Outbound.HttpSettings();
case Protocols.Wireguard: return new Outbound.WireguardSettings();
default: return null;
@@ -863,7 +863,7 @@ Outbound.Settings = class extends CommonClass {
case Protocols.VLESS: return Outbound.VLESSSettings.fromJson(json);
case Protocols.Trojan: return Outbound.TrojanSettings.fromJson(json);
case Protocols.Shadowsocks: return Outbound.ShadowsocksSettings.fromJson(json);
- case Protocols.Socks: return Outbound.SocksSettings.fromJson(json);
+ case Protocols.Mixed: return Outbound.MixedSettings.fromJson(json);
case Protocols.HTTP: return Outbound.HttpSettings.fromJson(json);
case Protocols.Wireguard: return Outbound.WireguardSettings.fromJson(json);
default: return null;
@@ -1141,7 +1141,7 @@ Outbound.ShadowsocksSettings = class extends CommonClass {
}
};
-Outbound.SocksSettings = class extends CommonClass {
+Outbound.MixedSettings = class extends CommonClass {
constructor(address, port, user, pass) {
super();
this.address = address;
@@ -1153,7 +1153,7 @@ Outbound.SocksSettings = class extends CommonClass {
static fromJson(json = {}) {
let servers = json.servers;
if (ObjectUtil.isArrEmpty(servers)) servers = [{ users: [{}] }];
- return new Outbound.SocksSettings(
+ return new Outbound.MixedSettings(
servers[0].address,
servers[0].port,
ObjectUtil.isArrEmpty(servers[0].users) ? '' : servers[0].users[0].user,
diff --git a/web/html/form/inbound.html b/web/html/form/inbound.html
index 9554d6aa..69f5fbb3 100644
--- a/web/html/form/inbound.html
+++ b/web/html/form/inbound.html
@@ -83,14 +83,14 @@
{{template "form/shadowsocks"}}
-
-
- {{template "form/dokodemo"}}
+
+
+ {{template "form/tunnel"}}
-
-
- {{template "form/socks"}}
+
+
+ {{template "form/mixed"}}
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html
index d2149b6d..271dea83 100644
--- a/web/html/form/outbound.html
+++ b/web/html/form/outbound.html
@@ -241,9 +241,9 @@
-
+
-
+
diff --git a/web/html/form/protocol/dokodemo.html b/web/html/form/protocol/dokodemo.html
index 819b7727..b73a7641 100644
--- a/web/html/form/protocol/dokodemo.html
+++ b/web/html/form/protocol/dokodemo.html
@@ -1,4 +1,4 @@
-{{define "form/dokodemo"}}
+{{define "form/tunnel"}}
diff --git a/web/html/form/protocol/socks.html b/web/html/form/protocol/socks.html
index e126c51c..979769da 100644
--- a/web/html/form/protocol/socks.html
+++ b/web/html/form/protocol/socks.html
@@ -1,4 +1,4 @@
-{{define "form/socks"}}
+{{define "form/mixed"}}
@@ -15,7 +15,7 @@
{{ i18n "username" }} |
{{ i18n "password" }} |
-
+
|
diff --git a/web/html/modals/inbound_info_modal.html b/web/html/modals/inbound_info_modal.html
index 0f29d318..7b7b0af7 100644
--- a/web/html/modals/inbound_info_modal.html
+++ b/web/html/modals/inbound_info_modal.html
@@ -354,7 +354,7 @@
[[ link.link ]]
-
+
{{ i18n "pages.inbounds.targetAddress" }} |
{{ i18n "pages.inbounds.destinationPort" }} |
@@ -376,7 +376,7 @@
-
+
{{ i18n "password" }} Auth |
{{ i18n "pages.inbounds.enable" }} udp |
diff --git a/web/html/xray.html b/web/html/xray.html
index 919989a4..2f2f415a 100644
--- a/web/html/xray.html
+++ b/web/html/xray.html
@@ -572,7 +572,7 @@
serverObj = o.settings.vnext;
break;
case Protocols.HTTP:
- case Protocols.Socks:
+ case Protocols.Mixed:
case Protocols.Shadowsocks:
case Protocols.Trojan:
serverObj = o.settings.servers;
diff --git a/web/service/config.json b/web/service/config.json
index 764d2b2e..e43675f8 100644
--- a/web/service/config.json
+++ b/web/service/config.json
@@ -19,7 +19,7 @@
"tag": "api",
"listen": "127.0.0.1",
"port": 62789,
- "protocol": "dokodemo-door",
+ "protocol": "tunnel",
"settings": {
"address": "127.0.0.1"
}
diff --git a/web/service/tgbot.go b/web/service/tgbot.go
index e957ff9f..e0acebb7 100644
--- a/web/service/tgbot.go
+++ b/web/service/tgbot.go
@@ -2129,8 +2129,8 @@ func (t *Tgbot) getInboundsAddClient() (*telego.InlineKeyboardMarkup, error) {
}
excludedProtocols := map[model.Protocol]bool{
- model.DOKODEMO: true,
- model.Socks: true,
+ model.Tunnel: true,
+ model.Mixed: true,
model.WireGuard: true,
model.HTTP: true,
}