Skip to content

Commit

Permalink
Add support for SOCKS5 nodes in Loon configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Oct 7, 2023
1 parent 5de1a3f commit c3e8e88
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/generator/config/subexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,19 @@ std::string proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
if(!scv.is_undef())
proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false");
break;
case ProxyType::SOCKS5:
proxy = "socks5," + hostname + "," + port;
if (!username.empty() && !password.empty())
proxy += "," + username + ",\"" + password + "\"";
proxy += ",over-tls=" + std::string(tlssecure ? "true" : "false");
if (tlssecure)
{
if(!host.empty())
proxy += ",tls-name=" + host;
if(!scv.is_undef())
proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false");
}
break;
default:
continue;
}
Expand Down

0 comments on commit c3e8e88

Please sign in to comment.