fix hy2
This commit is contained in:
@@ -492,13 +492,13 @@ export class InboundBuilderService {
|
||||
if (fs.existsSync(configPath)) {
|
||||
const fileContent = fs.readFileSync(configPath, 'utf8');
|
||||
|
||||
const authMatch = fileContent.match(/auth:\s*['"]?([^'"\n]+)['"]?/);
|
||||
const authMatch = fileContent.match(/password:\s*['"]?([^'"\n]+)['"]?/);
|
||||
if (authMatch) auth = authMatch[1];
|
||||
|
||||
const obfsMatch = fileContent.match(/type:\s*['"]?(salamander)['"]?/);
|
||||
if (obfsMatch) obfs = obfsMatch[1];
|
||||
|
||||
const passMatch = fileContent.match(/password:\s*['"]?([^'"\n]+)['"]?/);
|
||||
const passMatch = fileContent.match(/salamander:[\s\S]*?password:\s*['"]?([^'"\n]+)['"]?/);
|
||||
if (passMatch) obfsPass = passMatch[1];
|
||||
|
||||
const listenMatch = fileContent.match(/listen:\s*['"]?:(\d+)['"]?/);
|
||||
@@ -512,7 +512,7 @@ export class InboundBuilderService {
|
||||
|
||||
const params = new URLSearchParams();
|
||||
params.set('insecure', '0');
|
||||
params.set('sni', sni);
|
||||
params.set('sni', serverAddress);
|
||||
params.set('obfs', obfs);
|
||||
params.set('obfs-password', obfsPass);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user