Skip to content

http ​

An HTTP proxy. Compatible with sing-box http.

Inbound ​

An HTTP/1.x proxy: CONNECT tunnels and plain (forward) requests with an absolute URI — such a request is rewritten for the destination server, routed as a connection, and the response is returned to the client; keep-alive between requests is preserved. Authentication is Basic. It does not accept UDP. For HTTP and SOCKS on one port, see mixed.

FieldTypeDefaultMeaning
userslist of {username, password}—Accounts; without the list the inbound is open. A name does not repeat: one password per name

Socket settings are the listener block. Takes the tls block, which makes it an HTTPS proxy.

Not supported: set_system_proxy, domain_resolver — startup ends with the error not implemented yet.

Outbound ​

An HTTP/1.1 CONNECT client to an upstream proxy: a new CONNECT for every connection. TCP only; an HTTP/2 proxy does not fit.

FieldTypeDefaultMeaning
serverhost:portrequiredThe proxy address
username, passwordstring—Basic authentication
pathstring—The path of the CONNECT request; cannot be combined with the Host header
headersmapping—Additional request headers

Blocks: tls (HTTPS proxy), dial.

Example ​

yaml
inbounds:
  http-in:
    http:
      listen: 127.0.0.1:8080
      users:
        - username: user
          password: pass
outbounds:
  upstream:
    http:
      server: proxy.example.com:3128
      username: corp
      password: secret
      headers:
        X-Client: ours
      tls:
        sni: proxy.example.com
route:
  final:
    outbound: upstream

Module description for developers: modules/http.

GPL-3.0-or-later