} else if (request->flags.accelerated) {
/* WWW authorization on accelerated requests */
headertype = HDR_AUTHORIZATION;
- } else if (request->flags.intercepted || request->flags.tproxy) {
+ } else if (request->flags.intercepted || request->flags.spoof_client_ip) {
debugs(28, DBG_IMPORTANT, HERE << " authentication not applicable on intercepted requests.");
return -1;
} else {
char *name; /* visible name */
char *defaultsite; /* default web site */
- unsigned int intercepted:1; /* intercepting proxy */
- unsigned int tproxy:1; /* spoof client ip using TPROXY */
- unsigned int accel:1; /* HTTP accelerator */
- unsigned int vhost:1; /* uses host header */
- unsigned int sslBump:1; /* intercepts CONNECT requests */
+ unsigned int intercepted:1; /**< intercepting proxy port */
+ unsigned int spoof_client_ip:1; /**< spoof client ip if possible */
+ unsigned int accel:1; /**< HTTP accelerator */
+ unsigned int vhost:1; /**< uses host header */
+ unsigned int sslBump:1; /**< intercepts CONNECT requests */
int vport; /* virtual port support, -1 for dynamic, >0 static*/
int disable_pmtu_discovery;
}
#endif
} else if (strcmp(token, "tproxy") == 0) {
- s->tproxy = 1;
+ s->spoof_client_ip = 1;
IPInterceptor.StartTransparency();
#if USE_IPV6
/* INET6: until target TPROXY is known to work on IPv6 SOCKET, force wildcard to IPv4 */
request->flags.intercepted = http->flags.intercepted;
}
if(IPInterceptor.TransparentActive()) {
- request->flags.tproxy = conn->port->tproxy;
+ request->flags.spoof_client_ip = conn->port->spoof_client_ip;
}
if (internalCheck(request->urlpath.buf())) {
result->in.buf = (char *)memAllocBuf(CLIENT_REQ_BUF_SZ, &result->in.allocatedSize);
result->port = cbdataReference(port);
- if(port->intercepted || port->tproxy) {
+ if(port->intercepted || port->spoof_client_ip) {
IPAddress dst;
if (IPInterceptor.NatLookup(fd, me, peer, dst) == 0) {
enter_suid();
- if(s->tproxy) {
+ if(s->spoof_client_ip) {
fd = comm_openex(SOCK_STREAM, IPPROTO_TCP, s->s, (COMM_NONBLOCKING|COMM_TRANSPARENT), 0, "HTTP Socket");
} else {
fd = comm_open(SOCK_STREAM, IPPROTO_TCP, s->s, COMM_NONBLOCKING, "HTTP Socket");
debugs(1, 1, "Accepting " <<
(s->intercepted ? " intercepted" : "") <<
- (s->tproxy ? " spoofing" : "") <<
+ (s->spoof_client_ip ? " spoofing" : "") <<
(s->sslBump ? " bumpy" : "") <<
(s->accel ? " accelerated" : "")
<< " HTTP connections at " << s->s
/* If we need to transparently proxy the request
* then we need the client source protocol, address and port */
- if(request->flags.tproxy) {
+ if(request->flags.spoof_client_ip) {
fwd->src = request->client_addr;
// AYJ: do we need to pass on the transparent flag also?
}
ctimeout = Config.Timeout.connect;
}
- if (request->flags.tproxy)
+ if (request->flags.spoof_client_ip)
client_addr = request->client_addr;
if (ftimeout < 0)
debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << tos);
- if (request->flags.tproxy) {
+ if (request->flags.spoof_client_ip) {
fd = comm_openex(SOCK_STREAM, IPPROTO_TCP, outgoing, (COMM_NONBLOCKING|COMM_TRANSPARENT), tos, url);
} else {
fd = comm_openex(SOCK_STREAM, IPPROTO_TCP, outgoing, COMM_NONBLOCKING, tos, url);
} else {
#if LINUX_TPROXY2
- if (request->flags.tproxy) {
+ if (request->flags.spoof_client_ip) {
// try to set the outgoing address using TPROXY v2
// if it fails we abort any further TPROXY actions on this connection
if(IPInterceptor.SetTproxy2OutgoingAddr(int fd, const IPAddress &src) == -1) {
- request->flags.tproxy = 0;
+ request->flags.spoof_client_ip = 0;
}
}
#endif
{
ACLChecklist ch;
- if (request && request->flags.tproxy)
+ if (request && request->flags.spoof_client_ip)
return request->client_addr;
if (request)
closeHandler = NULL;
fwd->unregister(fd);
- if (orig_request->flags.tproxy)
+ if (orig_request->flags.spoof_client_ip)
client_addr = orig_request->client_addr;
if (_peer) {
struct request_flags
{
- request_flags(): range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),intercepted(0),internal(0),internalclient(0),must_keepalive(0),destinationIPLookedUp_(0)
+ request_flags(): range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),intercepted(0),spoof_client_ip(0),internal(0),internalclient(0),must_keepalive(0),destinationIPLookedUp_(0)
{
#if HTTP_VIOLATIONS
nocache_hack = 0;
#endif
- tproxy = 0;
}
unsigned int range:1;
#endif
unsigned int accelerated:1;
unsigned int intercepted:1; /**< transparently intercepted request */
- unsigned int tproxy:1; /**< spoof client ip using tproxy */
+ unsigned int spoof_client_ip:1; /**< spoof client ip if possible */
unsigned int internal:1;
unsigned int internalclient:1;
unsigned int must_keepalive:1;