MCPcopy
hub / github.com/alibaba/anyproxy / doWebSocket

Function doWebSocket

test/util/HttpUtil.js:190–205  ·  view source on GitHub ↗
(url, isProxy)

Source from the content-addressed store, hash-verified

188}
189
190function doWebSocket(url, isProxy) {
191 let ws;
192 if (isProxy) {
193 const agent = new HttpsProxyAgent(SOCKET_PROXY_HOST);
194 ws = new WebSocket(url, {
195 agent,
196 rejectUnauthorized: false
197 });
198 } else {
199 ws = new WebSocket(url, {
200 rejectUnauthorized: false
201 });
202 }
203
204 return ws;
205}
206
207function proxyGet(url, params, headers = {}) {
208 return proxyRequest('GET', url, params, headers);

Callers 2

proxyWsFunction · 0.85
directWsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected