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

Cannot detect Linux EVN_VAR IPv6 proxy #57

Open
GoogleCodeExporter opened this issue May 1, 2015 · 0 comments
Open

Cannot detect Linux EVN_VAR IPv6 proxy #57

GoogleCodeExporter opened this issue May 1, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Write an arbitrary Java program which uses proxy-vole
2. In a Linux env (for example Ubuntu) set an IPv6 network proxy - for example
export http_proxy=[::1]:8080
3. Run the program and it won't detect the proxy. If the proxy is changed to 
IPv4 address - for example export http_proxy=127.0.0.1:8080 everything works 
fine

I debugged the library and there's a bug in the ProxyUtil.parseProxySettings(). 
It tries to parse the proxy port and host assuming the proxy address is IPv4. 
The provided pattern - "\\w*?:?/*([^:/]+):?(\\d*)/?" 

What is the expected output? What do you see instead?
Expected to see that my proxy is detected, but instead it is not.

What version of the product are you using? On what operating system?
Latest at the moment - 20131209

Please provide any additional information below.

Here's a simple test to validate the desired behavior:
@Test
public void testIpv6Compatibility() {
      String proxyVar = "[::1]:8080";
      FixedProxySelector proxySelector =    proxyUtil.parseProxySettings(proxyVar);

      assertNotNull(proxySelector);
   }

I believe this issue can be very easily fixed and it will greatly increase the 
IPv6 support of the library.


Original issue reported on code.google.com by [email protected] on 11 Mar 2015 at 4:57

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

No branches or pull requests

1 participant