socket_io_debugger 0.1.0 copy "socket_io_debugger: ^0.1.0" to clipboard
socket_io_debugger: ^0.1.0 copied to clipboard

One-call proxy helper for Socket.IO client: reverse/forward modes for local debugging.

socket_io_debugger #

Утилита для подключения proxy к Socket.IO клиенту (reverse/forward) одним вызовом.

Пример:

final cfg = SocketIoDebugger.attach(
  baseUrl: 'https://example.com',
  socketPath: '/socket.io',
);
final socket = io.io(
  cfg.effectiveBaseUrl,
  io.OptionBuilder()
    .setTransports(['websocket'])
    .setPath(cfg.effectivePath)
    .setQuery(cfg.query)
    .build(),
);
if (cfg.useForwardOverrides) {
  await HttpOverrides.runZoned(() => socket.connect(), createHttpClient: (_) => cfg.httpClientFactory!());
} else {
  socket.connect();
}

ENV переменные:

  • HTTP_PROXY_MODE=reverse|forward|none
  • HTTP_PROXY, SOCKET_PROXY
  • HTTP_PROXY_PATH, SOCKET_PROXY_PATH
  • HTTP_PROXY_ALLOW_BAD_CERTS=true|false
  • HTTP_PROXY_ENABLED=true|false
0
likes
140
points
130
downloads

Publisher

unverified uploader

Weekly Downloads

One-call proxy helper for Socket.IO client: reverse/forward modes for local debugging.

Repository (GitHub)
View/report issues

Topics

#socket-io #socket #debug #proxy #reverse

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

socket_io_client

More

Packages that depend on socket_io_debugger