Merge branch 'cedar2025:dev' into dev

This commit is contained in:
大大白
2024-09-16 00:09:09 -04:00
committed by GitHub
7 changed files with 270 additions and 249 deletions
+2
View File
@@ -32,6 +32,8 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
+6 -2
View File
@@ -58,7 +58,11 @@ class Shadowrocket
['-', '_', ''], ['-', '_', ''],
base64_encode("{$server['cipher']}:{$password}") base64_encode("{$server['cipher']}:{$password}")
); );
return "ss://{$str}@{$server['host']}:{$server['port']}#{$name}\r\n"; $uri = "ss://{$str}@{$server['host']}:{$server['port']}";
if ($server['obfs'] == 'http') {
$uri .= "?plugin=obfs-local;obfs=http;obfs-host={$server['obfs-host']};obfs-uri={$server['obfs-path']}";
}
return $uri."#{$name}\r\n";
} }
public static function buildVmess($uuid, $server) public static function buildVmess($uuid, $server)
@@ -283,4 +287,4 @@ class Shadowrocket
} }
return $uri; return $uri;
} }
} }
+5 -1
View File
@@ -46,7 +46,11 @@ class V2rayNG
['-', '_', ''], ['-', '_', ''],
base64_encode("{$server['cipher']}:{$password}") base64_encode("{$server['cipher']}:{$password}")
); );
return "ss://{$str}@{$server['host']}:{$server['port']}#{$name}\r\n"; $uri = "ss://{$str}@{$server['host']}:{$server['port']}";
if ($server['obfs'] == 'http') {
$uri .= "?plugin=obfs-local;obfs=http;obfs-host={$server['obfs-host']};path={$server['obfs-path']}";
}
return $uri."#{$name}\r\n";
} }
public static function buildVmess($uuid, $server) public static function buildVmess($uuid, $server)
+5
View File
@@ -161,6 +161,11 @@ class ServerService
$userKey = Helper::uuidToBase64($user['uuid'], $config['userKeySize']); $userKey = Helper::uuidToBase64($user['uuid'], $config['userKeySize']);
$shadowsocks[$key]['password'] = "{$serverKey}:{$userKey}"; $shadowsocks[$key]['password'] = "{$serverKey}:{$userKey}";
} }
if ($v['obfs'] === 'http') {
$shadowsocks[$key]['obfs'] = 'http';
$shadowsocks[$key]['obfs-host'] = $v['obfs_settings']['host'];
$shadowsocks[$key]['obfs-path'] = $v['obfs_settings']['path'];
}
$servers[] = $shadowsocks[$key]->toArray(); $servers[] = $shadowsocks[$key]->toArray();
} }
return $servers; return $servers;
+252 -246
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.