Skip to content

Commit 57c94f1

Browse files
committed
fix: vless headers host bug
1 parent f2846b3 commit 57c94f1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/core/parser/protocol/vless.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class VlessParser extends Faker {
7070
return hasKey(headers, 'Host')
7171
? {
7272
...headers,
73-
Host: this.originConfig.add ?? ''
73+
Host: headers.Host || this.originConfig.add || ''
7474
}
7575
: headers;
7676
}

‎src/core/parser/protocol/vmess.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class VmessParser extends Faker {
7070
return hasKey(headers, 'Host')
7171
? {
7272
...headers,
73-
Host: this.originConfig.add ?? ''
73+
Host: headers.Host || this.originConfig.add || ''
7474
}
7575
: headers;
7676
}

0 commit comments

Comments
 (0)