0

I am developing & testing with "remote servers"; using URLs for the remote system like "whatever.internal.ip:8080/someWebApp"

Unfortunately, I am dealing with new IPs every day. And changing the URLs within the application I am developing/testing is cumbersome. Solution: simply use an URL like "localhost:8000" and dynamically connect port 8000 to "whatever.internal.ip:8080". So, when I want to test with a different remote system; I simply change the "forwarding" configuration; but my application itself simply continues to use the same "localhost"-based URL.

I did some searching and found the "redir" tool; installed it on my system; and invoked it (as normal user) with:

redir --laddr=127.0.0.1 --lport=8000 -cport=8080 -caddr=whatever...

But, unfortunately; the tool does nothing; it prints its "help" ... and exits. No error message; and --debug doesn't print anything either.

Please note: the "URL" part is not important for the question itself; I just added it to provide some background. Actually my question boils down to: when I type in the above example on my Ubuntu 14.04 ... "nothing happens" (besides redir printing its options).

[ Finally; I successfully used "ssh -L" to achieve this; but I am simply curious why redir doesn't work. Besides, ssh obviously implies that I can do ssh to the remote system; whereas redir claims to be independent of the underlying protocol ]

1

You should run: redir --laddr=127.0.0.1 --lport=8000 --cport=8080 --caddr=whatever...
all params should be with -- prefix and not - :-)

  • Ah, got it. But it would have helped if you had included: "you used - instead of --" ... I was staring at your answer for 5 minutes before figuring that I had a typo in my version of the command. So, redir is now doing something ... it prints "server: bind: Address already in use" ;-) – GhostCat Apr 28 '15 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.