Skip to content

Commit

Permalink
feat: mihomo snell 强制去除 udp 字段, 防止内核报错
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Feb 2, 2025
1 parent 9ac5e13 commit 2ae2867
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.16.23",
"version": "2.16.24",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/clash.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export default function Clash_Producer() {
proxy['preshared-key'] =
proxy['preshared-key'] ?? proxy['pre-shared-key'];
proxy['pre-shared-key'] = proxy['preshared-key'];
} else if (proxy.type === 'snell') {
delete proxy.udp;
} else if (proxy.type === 'vless') {
if (isPresent(proxy, 'sni')) {
proxy.servername = proxy.sni;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/clashmeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default function ClashMeta_Producer() {
proxy['preshared-key'] =
proxy['preshared-key'] ?? proxy['pre-shared-key'];
proxy['pre-shared-key'] = proxy['preshared-key'];
} else if (proxy.type === 'snell') {
delete proxy.udp;
} else if (proxy.type === 'vless') {
if (isPresent(proxy, 'sni')) {
proxy.servername = proxy.sni;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/egern.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ export default function Egern_Producer() {
// sni: proxy.sni,
// skip_tls_verify: proxy['skip-cert-verify'],
};
} else if (proxy.type === 'snell') {
delete proxy.udp;
} else if (proxy.type === 'vless') {
if (proxy.network === 'ws') {
proxy.transport = {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/shadowrocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export default function ShadowRocket_Producer() {
proxy['preshared-key'] =
proxy['preshared-key'] ?? proxy['pre-shared-key'];
proxy['pre-shared-key'] = proxy['preshared-key'];
} else if (proxy.type === 'snell') {
delete proxy.udp;
} else if (proxy.type === 'vless') {
if (isPresent(proxy, 'sni')) {
proxy.servername = proxy.sni;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/core/proxy-utils/producers/stash.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ export default function Stash_Producer() {
proxy['preshared-key'] =
proxy['preshared-key'] ?? proxy['pre-shared-key'];
proxy['pre-shared-key'] = proxy['preshared-key'];
} else if (proxy.type === 'snell') {
delete proxy.udp;
} else if (proxy.type === 'vless') {
if (isPresent(proxy, 'sni')) {
proxy.servername = proxy.sni;
Expand Down

0 comments on commit 2ae2867

Please sign in to comment.