MCPcopy Create free account
hub / github.com/cfwuya1/sublink-worker-admin / createTlsConfig

Function createTlsConfig

src/utils.js:142–159  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

140 }
141
142 export function createTlsConfig(params) {
143 let tls = { enabled: false };
144 if (params.security != 'none') {
145 tls = {
146 enabled: true,
147 server_name: params.sni || params.host,
148 insecure: !!params?.allowInsecure || !!params?.insecure || !!params?.allow_insecure,
149 };
150 if (params.security === 'reality') {
151 tls.reality = {
152 enabled: true,
153 public_key: params.pbk,
154 short_id: params.sid,
155 };
156 }
157 }
158 return tls;
159 }
160
161export function createTransportConfig(params) {
162 return {

Callers 3

parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected