Skip to content

Commit

Permalink
updated code based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Oct 13, 2023
1 parent a6b2733 commit 2b69a13
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public String getProxyString() throws URISyntaxException {
if (protocol == ProxyProtocol.SOCKS5||protocol == ProxyProtocol.HTTP||protocol == ProxyProtocol.HTTPS) {
// Alright, we now need to construct a new SOCKS5 URL. We are going to defer
// doing that to the Java standard library (er, the Android stdlib).
String urlStr = protocol+"://" + hostname + ":" + port + "/";
String urlStr = protocol.getProtocol()+"://" + hostname + ":" + port + "/";
if (isIPv6(hostname)) {
urlStr = protocol+"://[" + hostname + "]:" + port + "/"; // IPv6 must be quoted in URLs
urlStr = protocol.getProtocol()+"://[" + hostname + "]:" + port + "/"; // IPv6 must be quoted in URLs
}
URI url = new URI(urlStr);
return url.toASCIIString();
Expand Down

0 comments on commit 2b69a13

Please sign in to comment.