Skip to content

Commit

Permalink
fix: add hy2 obfs-password
Browse files Browse the repository at this point in the history
  • Loading branch information
7Sageer committed Aug 13, 2024
1 parent 59dbdd5 commit 7b799b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ClashConfigBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ export class ClashConfigBuilder extends BaseConfigBuilder {
type: proxy.type,
server: proxy.server,
port: proxy.server_port,
obfs: proxy.obfs.type,
'obfs-password': proxy.obfs.password,
password: proxy.password,
auth: proxy.password,
'skip-cert-verify': proxy.tls.insecure,
Expand Down
7 changes: 7 additions & 0 deletions src/ProxyParsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ export class ProxyParser {
insecure: true,
alpn: ["h3"],
};

const obfs = {};
if (params['obfs-password']) {
obfs.type = params.obfs;
obfs.password = params['obfs-password'];
};

return {
tag: name,
Expand All @@ -132,6 +138,7 @@ export class ProxyParser {
server_port: port,
password: uuid,
tls: tls,
obfs: obfs,
up_mbps: 100,
down_mbps: 100
};
Expand Down

0 comments on commit 7b799b7

Please sign in to comment.