Skip to content

Commit f50eca5

Browse files
committed
mihomo sni
1 parent fc77478 commit f50eca5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clash/mihomo-curl-line/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ parse_vmess() {
219219
local tls_val=$(echo "$json_data" | yq -r '.tls')
220220
local path=$(echo "$json_data" | yq -r '.path')
221221
local host_header=$(echo "$json_data" | yq -r '.host')
222+
local sni=$(echo "$json_data" | yq -r '.sni')
222223

223224
[ -z "$name" ] && [ -n "$server" ] && [ -n "$port" ] && name="vmess-${server}:${port}"
224225

@@ -238,6 +239,7 @@ parse_vmess() {
238239
echo "tls: $tls_val"
239240
echo "path: $path"
240241
echo "host-header: $host_header"
242+
echo "sni: $sni"
241243
echo "最后结果----------proxies-----------------------"
242244

243245
echo ".proxies += [{
@@ -251,6 +253,7 @@ parse_vmess() {
251253
\"network\": \"$network\",
252254
\"tls\": $([ "$tls_val" = "tls" ] && echo "true" || echo "false"),
253255
\"udp\": true,
256+
\"sni\": \"$sni\",
254257
\"ws-opts\": {\"path\": \"$path\", \"headers\": {\"Host\": \"$host_header\"}}
255258
}]"
256259
echo "最后结果---------------------------------"

0 commit comments

Comments
 (0)