diff --git a/.changeset/red-geckos-explain.md b/.changeset/red-geckos-explain.md new file mode 100644 index 00000000..e9bf2eb9 --- /dev/null +++ b/.changeset/red-geckos-explain.md @@ -0,0 +1,5 @@ +--- +"proxy": minor +--- + +Enable localAddress flag diff --git a/packages/proxy/src/bin/proxy.ts b/packages/proxy/src/bin/proxy.ts index 69887e89..ad9a82e6 100755 --- a/packages/proxy/src/bin/proxy.ts +++ b/packages/proxy/src/bin/proxy.ts @@ -22,13 +22,13 @@ args.option( '"authenticate" command to run when the "Proxy-Authorization" header is sent', '', String +) +.option( + 'local-address', + 'IP address of the network interface to send the outgoing requests through', + '', + String ); -//.option( -// 'local-address', -// 'IP address of the network interface to send the outgoing requests through', -// '', -// String -//); const flags = args.parse(process.argv); const { port, authenticate } = flags; @@ -46,9 +46,9 @@ const proxy = createProxy(); * Proxy outgoing request localAddress parameter */ -//if (flags.localAddress) { -// proxy.localAddress = flags.localAddress; -//} +if (flags.localAddress) { + proxy.localAddress = flags.localAddress; +} /** * Proxy authenticate function.