mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-10-21 19:44:13 +00:00
78 lines
1.3 KiB
Markdown
78 lines
1.3 KiB
Markdown
### Structure
|
|
|
|
```json
|
|
{
|
|
"type": "http",
|
|
"tag": "http-in",
|
|
|
|
... // Listen Fields
|
|
|
|
"version": [],
|
|
"users": [
|
|
{
|
|
"username": "admin",
|
|
"password": "admin"
|
|
}
|
|
],
|
|
"tls": {},
|
|
"set_system_proxy": false,
|
|
|
|
... // HTTP2 Fields / QUIC Fields
|
|
}
|
|
```
|
|
|
|
### Listen Fields
|
|
|
|
See [Listen Fields](/configuration/shared/listen/) for details.
|
|
|
|
### Fields
|
|
|
|
#### version
|
|
|
|
!!! question "Since sing-box 1.15.0"
|
|
|
|
List of HTTP versions to serve.
|
|
|
|
Available values: `1`, `2`, `3`.
|
|
|
|
`1` and `2` are used by default.
|
|
|
|
TLS is required for `3`.
|
|
|
|
#### tls
|
|
|
|
TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
|
|
|
|
#### users
|
|
|
|
HTTP users.
|
|
|
|
No authentication required if empty.
|
|
|
|
#### set_system_proxy
|
|
|
|
!!! quote ""
|
|
|
|
Only supported on Linux, Android, Windows, and macOS.
|
|
|
|
!!! warning ""
|
|
|
|
To work on Android and Apple platforms without privileges, use tun.platform.http_proxy instead.
|
|
|
|
Automatically set system proxy configuration when start and clean up when stop.
|
|
|
|
### HTTP2 Fields
|
|
|
|
!!! question "Since sing-box 1.15.0"
|
|
|
|
When `version` contains `2`.
|
|
|
|
See [HTTP2 Fields](/configuration/shared/http2/) for details.
|
|
|
|
### QUIC Fields
|
|
|
|
!!! question "Since sing-box 1.15.0"
|
|
|
|
When `version` contains `3`, [HTTP2 Fields](#http2-fields) are replaced by QUIC Fields.
|
|
|
|
See [QUIC Fields](/configuration/shared/quic/) for details.
|