-
Notifications
You must be signed in to change notification settings - Fork 88
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
How to set Proxy for TUSClient? #52
Comments
tus-java-client does not have any feature for proxy support yet. If you want to contribute one, feel free to open a PR. As a workaround you can set a proxy for all HttpUrlConnections as described in this article: https://manismaran.wordpress.com/how-to-use-httpsurlconnection-through-proxy-by-setproperty-url-connection-and-proxy-httpurlconnection/ If you want to modify the HttpUrlConnection to add authentication (or similar), you can override the prepareConnection method in your own subclass of TusClient: https://github.com/tus/tus-java-client/blob/master/src/main/java/io/tus/java/client/TusClient.java#L319 Hope that helps! |
We will investigate into an easier way for setting proxies in the next major release: #78 |
@Acconut as said by @LaravZ in #78 (comment). We could fix this pretty quickly and robust. Would you be open to review the code (provided we create a PR), merge it (after comments are resolved) and create a new release? The lack of this feature is blocking our implementation. We're behind a proxy for external connections, but don't want to use it for all request as most of them are local. |
Question
How to set Proxy for TUSClient?
We are using TUSClient to upload a large file to a server in chunks. We are required to go via Proxy server (with authentication).
But when I see the
createUpload
method inTUSClient
class, I see this below line:HttpURLConnection connection = (HttpURLConnection) uploadCreationURL.openConnection();
I could not see any Proxy feature that we can enable or introduce. Please suggest.
Setup details
Please provide following details, if applicable to your situation:
The text was updated successfully, but these errors were encountered: