Open capmorganbih opened 1 hour ago
I can’t use a per-request proxy with Jsoup.
Connection s = Jsoup.newSession() .proxy("connect.net", 8080) .auth(auth -> { if (auth.isServer()) { Validate.isTrue(auth.url().getHost().equals("example.com")); return auth.credentials("username", "password"); } else { // auth.isProxy() return auth.credentials("proxyUsername", "proxyPassword"); } }); s.newRequest("https://example.com/adminzone/").execute();
This code fails with a 407 Proxy Authentication Required, even though I’m using valid credentials. The key issue is that the auth callback does not get triggered at all
I’m running this on macOS
@jhy could you please clarify what am I doing wrong?
I can’t use a per-request proxy with Jsoup.
This code fails with a 407 Proxy Authentication Required, even though I’m using valid credentials. The key issue is that the auth callback does not get triggered at all
I’m running this on macOS