You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduced support for specifying proxy environment variables for the connection methods. For HTTP it supports `HTTP_PROXY` or `HTTPS_PROXY`, and for WebSockets it supports `WS_PROXY` and `WSS_PROXY`.
Added `fetchOptions` to AbstractRemoteOptions. Allows consumers to include fields such as `dispatcher` (e.g. for proxy support) to the fetch invocations.
6
+
Also ensuring all options provided to `connect()` are passed onwards, allows packages to have their own option definitions for `connect()` and the abstract `generateSyncStreamImplementation()`.
Copy file name to clipboardExpand all lines: packages/node/README.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,22 @@ contains everything you need to know to get started implementing PowerSync in yo
56
56
57
57
A simple example using `@powersync/node` is available in the [`demos/example-node/`](../demos/example-node) directory.
58
58
59
+
# Proxy Support
60
+
61
+
This SDK supports HTTP, HTTPS, and WebSocket proxies via environment variables.
62
+
63
+
## HTTP Connection Method
64
+
65
+
Internally we probe the http environment variables and apply it to fetch requests ([undici](https://www.npmjs.com/package/undici/v/5.6.0))
66
+
67
+
- Set the `HTTPS_PROXY` or `HTTP_PROXY` environment variable to automatically route HTTP requests through a proxy.
68
+
69
+
## WEB Socket Connection Method
70
+
71
+
Internally the [proxy-agent](https://www.npmjs.com/package/proxy-agent) dependency for WebSocket proxies, which has its own internal code for automatically picking up the appropriate environment variables:
72
+
73
+
- Set the `WS_PROXY` or `WSS_PROXY` environment variable to route the webocket connections through a proxy.
74
+
59
75
# Found a bug or need help?
60
76
61
77
- Join our [Discord server](https://discord.gg/powersync) where you can browse topics from our community, ask questions, share feedback, or just say hello :)
0 commit comments