1 parent 917e89f commit ad3a982Copy full SHA for ad3a982
1 file changed
src/core/parser/protocol/vless.ts
@@ -65,7 +65,21 @@ export class VlessParser extends Faker {
65
this.#confuseLink = this.#confuseConfig.href!;
66
}
67
68
+ #restoreWs(proxy: Record<string, string | number | any>): void {
69
+ if (proxy.network === 'ws') {
70
+ proxy['ws-opts'] = {
71
+ ...proxy['ws-opts'],
72
+ path: decodeURIComponent(this.originConfig.searchParams?.get('path') ?? '/'),
73
+ headers: {
74
+ ...proxy['ws-opts'].headers,
75
+ Host: this.originConfig.host
76
+ }
77
+ };
78
79
80
+
81
public restoreClash(proxy: Record<string, any>, ps: string): Record<string, any> {
82
+ this.#restoreWs(proxy);
83
proxy.name = ps;
84
proxy.server = this.originConfig.hostname ?? '';
85
proxy.port = Number(this.originConfig?.port ?? 0);
0 commit comments