[
https://issues.apache.org/jira/browse/TS-2482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14386809#comment-14386809
]
Zhao Yongming commented on TS-2482:
-----------------------------------
no time to test, here is the rough patch:
{code}
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index c6f55ed..cc4ffdc 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -865,7 +865,7 @@ HttpTransact::EndRemapRequest(State* s)
/////////////////////////////////////////////////////////
if (s->http_config_param->reverse_proxy_enabled
&& !s->client_info.is_transparent
- && !incoming_request->is_target_in_url()) {
+ && !(incoming_request->is_target_in_url() ||
incoming_request->m_host_length > 0)) {
/////////////////////////////////////////////////////////
// the url mapping failed, reverse proxy was enabled,
// and the request contains no host:
{code}
and:
{code}
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index cfdd214..c04c0f4 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -62,7 +62,7 @@ SocksEntry::init(ProxyMutex * m, SocksNetVC * vc, unsigned
char socks_support, u
req_data.api_info = 0;
req_data.xact_start = time(0);
- assert(ats_is_ip4(&target_addr));
+ //assert(ats_is_ip4(&target_addr));
ats_ip_copy(&req_data.dest_ip, &target_addr);
//we dont have information about the source. set to destination's
{code}
the patch assert may need more work, and the socks server only do http checking
and no other socks support. that is a not so good socks server indeed, I'd see
someone take it and continue to improve the socks server feature.
so, paste the patch here, before it lost in time.
> Problems with SOCKS
> -------------------
>
> Key: TS-2482
> URL: https://issues.apache.org/jira/browse/TS-2482
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Reporter: Radim Kolar
> Assignee: weijin
> Fix For: sometime
>
>
> There are several problems with using SOCKS. I am interested in case when TF
> is sock client. Client sends HTTP request and TF uses SOCKS server to make
> connection to internet.
> a/ - not documented enough in default configs
> From default configs comments it seems that for running
> TF 4.1.2 as socks client, it is sufficient to add one line to socks.config:
> dest_ip=0.0.0.0-255.255.255.255 parent="10.0.0.7:9050"
> but socks proxy is not used. If i run tcpdump sniffing packets TF never
> tries to connect to that SOCKS.
> From source code -
> https://github.com/apache/trafficserver/blob/master/iocore/net/Socks.cc it
> looks that is needed to set "proxy.config.socks.socks_needed" to activate
> socks support. This should be documented in both sample files: socks.config
> and record.config
> b/
> after enabling socks, i am hit by this assert:
> Assertion failed: (ats_is_ip4(&target_addr)), function init, file Socks.cc,
> line 65.
> i run on dual stack system (ip4,ip6).
> This code is setting default destination for SOCKS request? Can not you use
> just 127.0.0.1 for case if client gets connected over IP6?
> https://github.com/apache/trafficserver/blob/master/iocore/net/Socks.cc#L66
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)