-
Notifications
You must be signed in to change notification settings - Fork 132
New feature: HTTP proxy config using HomeServerConnectionConfig #519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I've made a few comments.
Regarding the proxy usage, maybe it should also be passed when opening a url connection at those places:
matrix-android-sdk/matrix-sdk/src/main/java/org/matrix/androidsdk/db/MXMediaDownloadWorkerTask.java
Line 740 in 27c30ba
connection = (HttpURLConnection) url.openConnection(); matrix-android-sdk/matrix-sdk/src/main/java/org/matrix/androidsdk/db/MXMediaUploadWorkerTask.java
Line 299 in f967dab
conn = (HttpURLConnection) url.openConnection();
And maybematrix-android-sdk/matrix-sdk/src/main/java/org/matrix/androidsdk/rest/client/UrlPostTask.java
Line 66 in f967dab
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
matrix-sdk-core/src/main/java/org/matrix/androidsdk/RestClientHttpClientFactory.kt
Outdated
Show resolved
Hide resolved
matrix-sdk-core/src/main/java/org/matrix/androidsdk/HomeServerConnectionConfig.java
Outdated
Show resolved
Hide resolved
matrix-sdk-core/src/main/java/org/matrix/androidsdk/HomeServerConnectionConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok to pass the HomeServerConnectionConfig to whoever does network requests.
Please just revert the change on the DataHandler as per the comments.
First I thought about just passing the Proxy, but we may need other parameters. I'm just vigilant, because it also contains the access token, which is quite a sensitive data and I do not want it to be used by mistake. But for the moment it's ok.
matrix-sdk/src/main/java/org/matrix/androidsdk/MXDataHandler.java
Outdated
Show resolved
Hide resolved
…nnectionConfig for UrlPostTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the update
With this change it is possible to configure a HTTP proxy (hostname & port) from an app which integrates the SDK
Pull Request Checklist
Signed-off-by: Jürgen Wischer me@unclejay.de