Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change IP address per request - spoof #101

Open
mahalamobile opened this issue Nov 23, 2017 · 2 comments
Open

change IP address per request - spoof #101

mahalamobile opened this issue Nov 23, 2017 · 2 comments

Comments

@mahalamobile
Copy link

Hi

Am using XChange github which makes REST calls to exchange API's and uses rescu as part of the call. Is there anyway to set the from IP address for each call?

thanks

@mmazi
Copy link
Owner

mmazi commented Nov 24, 2017

There is no explicit support for this in rescu currently. However, rescu uses java.net.HttpURLConnection under the hood to create connections; see if HttpURLConnection supports what you want, then we might find a way to do it.

@traviscollins
Copy link

According to docs I found googling, you'd have to create your own URLStreamHandlerFactory. That would allow you to intercept each open connection attempt, and return the URLStreamHandler with a hostAddress of your choosing for the particular request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants