-
Notifications
You must be signed in to change notification settings - Fork 416
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
Proxy support with basic authentication has been added using system properties #314
Conversation
…roperties below -Dhttp.proxyHost=host.domain.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=host.domain.com -Dhttps.proxyPort=8080 -DproxySet=true -DproxyUser=user -DproxyPassword=password
@@ -46,6 +46,16 @@ class ExternalDocumentationLinkResolver @Inject constructor( | |||
connection.connectTimeout = timeout | |||
connection.readTimeout = timeout | |||
|
|||
// Add proxy basic authentication when proxyUser, proxyPassword is set and proxySet is true | |||
val systemSettings = System.getProperties() | |||
if (systemSettings.getValue("proxySet").toString() == "true" |
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.
As far, as I debugged, Gradle already support basic authentification, so no need for such code in Gradle runner plugin.
Isn't it better to use java.net.Authenticator
? It looks like more straightforward approach.
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.
And why not to use http.proxyUser
and so on?
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.
could you debug and verify also Maven + proxy + basic authentication ?
I will try also will try use "systemProp.jdk.http.auth.tunneling.disabledSchemes" too and let you know
we are no using Graddle at the moment so we need to fix Maven first
Dokka already supports proxy authentication according to my comment in #213 (comment) |
Checked, doesn't work properly, looks like Dokka for Maven should use Maven transport API http://maven.apache.org/wagon/ |
So, anyway, changes is required |
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 this doesn't yet work when Gradle is run behind a corporate proxy. This change might fix it.
Dokka has been rewritten since the creation of this PR, please open a new PR if the issue still persists |
Dokka is great plugin unfortunatelly can't be used in corporates behind proxy therefore proxy support with basic authentication has been added using system properties below
-Dhttp.proxyHost=host.domain.com
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=host.domain.com
-Dhttps.proxyPort=8080
-DproxySet=true
-DproxyUser=user
-DproxyPassword=password
if proxySet is true and proxyUser with proxyPassword is set then basic proxy authentication is added