question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proxy http requests to external proxy for internet access

See original GitHub issue

Issue Type:

  • Bug report
  • Feature request

We are running a Linkerd-to-Linkerd setup where we use http_proxy to route HTTP traffic to Linkerd, but in our infrastructure internet access is only provided using a proxy server. We need to be able to tell Linkerd to proxy internet traffic to another proxy server.

Here is the Linkerd config we use today:

admin:
  ip: 0.0.0.0
  port: 9990

namers:
- kind: io.l5d.consul
  includeTag: true
  failFast: true
  useHealthCheck: false
  host: infrastructure-consul
  port: 8500

routers:
  - label: http1-out
    protocol: http
    servers:
      - port: 4140
        ip: 0.0.0.0
    dtab: |
      /svc        =>  /#/io.l5d.consul/.local/external;
      /host       => /svc;
      /http/*/*   => /host;
    identifier:
     kind: io.l5d.header.token

  - label: http1-in
    protocol: http
    servers:
      - port: 4141
        ip: 0.0.0.0
    dtab: |
      /svc        =>  /#/io.l5d.consul/.local/internal;
      /host       => /svc;
      /http/*/*   => /host;
    identifier:
      kind: io.l5d.header.token

telemetry:
  - kind: io.zipkin.http
    host: zipkin:9411
    initialSampleRate: 1.00

usage:
  orgId: linkerd-examples-consul

We have tried to use the io.buoyant.rinet but that only gives us the feature to make Linkerd make http requests to external resources, but not to a proxy. We could route internet traffic directly to the Internet proxy, but then we loos all the features of Linkerd and we need to implement that in all our services.

We are only using http(s) so we do only need to talk to an http proxy(in our case a squid).

Our end gold would be a flow looking like this: [service] -> [Linkerd] -> [InternetProxy] -> (Internet)

Or if multiple connected services are in play: [service] -> [Linkerd] -> [Linkerd] -> [service] -> [Linkerd] -> [InternetProxy] -> (Internet)

Environment:

  • Linkerd version 1.3.5

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
KZachariassencommented, Jun 13, 2018

Why did you close this issue. I still think it’s 100% relevant and a feature we really need.

0reactions
DudnykOleksandrcommented, Aug 30, 2019

Hi @DudnykOleksandr!

I think the problem has to do with the way that proxies interact. Linkerd acts like a transparent proxy which means that when clients modify a request to make a proxy request by making the URI absolute, Linkerd undoes that change by dropping the scheme and making the request back into a normal request. That behavior was added to Linkerd in this PR. However, squid expects to be treated as a proxy and expects proxy requests with absolute URIs.

I haven’t used squid, personally, but it looks like this behavior can be changed by changing the squid to intercept mode:

I believe that in intercept mode, squid no longer requires requests to have absolute URIs.

@adleong thank you for clarifying this behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proxy servers and tunneling - HTTP - MDN Web Docs
This is how a client behind an HTTP proxy can access websites using SSL (i.e. HTTPS, port 443). Note, however, that not all...
Read more >
Proxy server types and uses for HTTP Server
A proxy server lessens network traffic by rejecting unwanted requests, forwarding requests to balance and optimize server workload, and fulfilling requests by ...
Read more >
External Proxies • Charles Web Debugging ...
You can configure separate proxy addresses and ports for: HTTP; HTTPS; SOCKS. If you have a SOCKS proxy Charles will use it for...
Read more >
Configure Apache to use external proxy for internet ...
Now the problem is that my corporate network requires me to use HTTP proxy for external internet connections. To ilustrate, this doesn't work:...
Read more >
External Proxy
Some companies have a central Proxy server, and all outgoing requests must go through to the Proxy Server in order to access the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found