greim/hoxy

question

Closed this issue · 2 comments

I want to forward https://domain.com full request to a http proxy server ( http://127.0.0.1:80)

how would i do that? any examples on this? :)

it would basically forward the full request, then get the return from the server.. the return as in response only, not headers.

I guess this is what I'm supposed to use. domain.tld is what i want to "hijack" the traffic of into my own proxy server.

var hoxy = require('hoxy');
var proxy = hoxy.createServer({
  upstreamProxy: '127.0.0.1:80',
  reverse: 'https://domain.tld',
  certAuthority: { key, cert },
  tls: { key, cert },
  slow: { rate, latency, up, down }
});
greim commented

So basically a conditional flow like this?

browser => hoxy => yourProxy => domain.tld  # if domain.tld
browser => hoxy => otherDomain.tld          # otherwise

Unfortunately Hoxy doesn't have a built-in way to do this. The example above would forward to the upstream proxy no matter which domain.

The reverse option just tells Hoxy where to forward traffic if you visit the proxy directly (rather than configuring your client to use it as a proxy).