Skip to content

Commit e27aae0

Browse files
committed
2 parents 96050d6 + c4a1b6d commit e27aae0

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/ProxyParsers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ export class ProxyParser {
190190
obfs: obfs,
191191
auth: params.auth,
192192
recv_window_conn: params.recv_window_conn,
193-
insecure: Boolean(params.insecure),
194193
up_mbps: params?.upmbps ? parseInt(params.upmbps) : undefined,
195194
down_mbps: params?.downmbps ? parseInt(params.downmbps) : undefined
196195
};

src/utils.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ export function parseServerInfo(serverInfo) {
167167
}
168168
return tls;
169169
}
170-
171-
export function createTransportConfig(params) {
170+
171+
export function createTransportConfig(params) {
172172
return {
173-
type: params.type,
174-
path: params.path ?? undefined,
175-
...(params.host && { 'headers': { 'host': params.host } }),
176-
service_name: params.serviceName ?? undefined,
173+
type: params.type,
174+
path: params.path ?? undefined,
175+
...(params.host && {'headers': {'host': params.host}}),
176+
...(params.type === 'grpc' && {
177+
service_name: params.serviceName ?? undefined,
178+
})
177179
};
178-
}
180+
}

0 commit comments

Comments
 (0)