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

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

socket_io_debugger #

One-call helper to attach a proxy to a Socket.IO client (reverse/forward modes).

Example:

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();
}

Environment variables:

  • 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
135
points
97
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