English
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.
| Field | Type | Default | Meaning |
|---|---|---|---|
users | list 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.
| Field | Type | Default | Meaning |
|---|---|---|---|
server | host:port | required | The proxy address |
username, password | string | — | Basic authentication |
path | string | — | The path of the CONNECT request; cannot be combined with the Host header |
headers | mapping | — | 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: upstreamModule description for developers: modules/http.