mirror of
https://github.com/cfal/shoes.git
synced 2026-11-06 08:14:11 +00:00
Add standard HTTP/2 CONNECT to HTTP and mixed listeners and opt-in HTTP proxy clients, allowing concurrent TCP tunnels to share a connection while preserving legacy HTTP/1 and NaiveProxy behavior. Keep the H2 transport independent of NaiveProxy, preserve route isolation and per-stream authentication, require matching TLS ALPN for explicit H2 clients, and handle flow control, cancellation, and graceful shutdown. Include configuration documentation, an example, compatibility regressions, and interoperability coverage for sing-box, Mihomo, and the native Caddy-based Naive server.
34 lines
868 B
YAML
34 lines
868 B
YAML
# HTTPS proxy listener accepting H2 CONNECT and legacy HTTP/1 clients.
|
|
- address: "0.0.0.0:8443"
|
|
protocol:
|
|
type: tls
|
|
default_tls_target:
|
|
cert: cert.pem
|
|
key: key.pem
|
|
alpn_protocols: [h2, http/1.1]
|
|
protocol:
|
|
type: http
|
|
username: user
|
|
password: replace-me
|
|
|
|
# Local HTTP entry point forwarding through an H2 HTTPS proxy.
|
|
- address: "0.0.0.0:8080"
|
|
protocol:
|
|
type: http
|
|
username: local-user
|
|
password: replace-local-password
|
|
rules:
|
|
- mask: "0.0.0.0/0"
|
|
action: allow
|
|
client_chain:
|
|
- address: "proxy.example.com:8443"
|
|
protocol:
|
|
type: tls
|
|
sni_hostname: proxy.example.com
|
|
alpn_protocols: [h2]
|
|
protocol:
|
|
type: http
|
|
http_version: h2
|
|
username: user
|
|
password: replace-me
|