mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-05-31 04:37:20 +02:00
Updated Add Routing Via Config File (markdown)
parent
5cecf2d845
commit
654cead31d
@ -1,5 +1,191 @@
|
||||
Other than editing routing in the web UI, you can also create a config file and let Zoraxy load it on startup. You can put your config file under ```conf/proxy/``` as JSON file with file extension ".config". For example, here is an example of `(ST).test.localhost.config`
|
||||
** This config structure is for Zoraxy v3.1.7 or above**
|
||||
```json
|
||||
{
|
||||
"ProxyType": 1,
|
||||
"RootOrMatchingDomain": "test1.localhost",
|
||||
"MatchingDomainAlias": [
|
||||
"test2.localhost"
|
||||
],
|
||||
"ActiveOrigins": [
|
||||
{
|
||||
"OriginIpOrDomain": "example.com",
|
||||
"RequireTLS": true,
|
||||
"SkipCertValidations": false,
|
||||
"SkipWebSocketOriginCheck": true,
|
||||
"Weight": 1,
|
||||
"MaxConn": 0
|
||||
}
|
||||
],
|
||||
"InactiveOrigins": [
|
||||
{
|
||||
"OriginIpOrDomain": "broken.example.com",
|
||||
"RequireTLS": true,
|
||||
"SkipCertValidations": false,
|
||||
"SkipWebSocketOriginCheck": true,
|
||||
"Weight": 1,
|
||||
"MaxConn": 0
|
||||
}
|
||||
],
|
||||
"UseStickySession": false,
|
||||
"UseActiveLoadBalance": false,
|
||||
"Disabled": false,
|
||||
"BypassGlobalTLS": false,
|
||||
"VirtualDirectories": [
|
||||
{
|
||||
"MatchingPath": "/firework/",
|
||||
"Domain": "example.com/fw/",
|
||||
"RequireTLS": true,
|
||||
"SkipCertValidations": false,
|
||||
"Disabled": false
|
||||
}
|
||||
],
|
||||
"HeaderRewriteRules": {
|
||||
"UserDefinedHeaders": [
|
||||
{
|
||||
"Direction": 0,
|
||||
"Key": "X-Foo-Bar",
|
||||
"Value": "hello,world",
|
||||
"IsRemove": false
|
||||
}
|
||||
],
|
||||
"RequestHostOverwrite": "",
|
||||
"HSTSMaxAge": 0,
|
||||
"EnablePermissionPolicyHeader": true,
|
||||
"PermissionPolicy": {
|
||||
"accelerometer": [
|
||||
"*"
|
||||
],
|
||||
"ambient_light_sensor": [
|
||||
"*"
|
||||
],
|
||||
"autoplay": [
|
||||
"*"
|
||||
],
|
||||
"battery": [],
|
||||
"camera": [
|
||||
"self"
|
||||
],
|
||||
"cross_origin_isolated": [
|
||||
"self"
|
||||
],
|
||||
"display_capture": [
|
||||
"self"
|
||||
],
|
||||
"document_domain": [
|
||||
"*"
|
||||
],
|
||||
"encrypted_media": [
|
||||
"*"
|
||||
],
|
||||
"execution_while_not_rendered": [
|
||||
"*"
|
||||
],
|
||||
"execution_while_out_of_viewport": [
|
||||
"*"
|
||||
],
|
||||
"fullscreen": [
|
||||
"*"
|
||||
],
|
||||
"geolocation": [],
|
||||
"gyroscope": [],
|
||||
"keyboard_map": [],
|
||||
"magnetometer": [],
|
||||
"microphone": [
|
||||
"*"
|
||||
],
|
||||
"midi": [],
|
||||
"navigation_override": [],
|
||||
"payment": [],
|
||||
"picture_in_picture": [
|
||||
"*"
|
||||
],
|
||||
"publickey_credentials_get": [],
|
||||
"screen_wake_lock": [],
|
||||
"sync_xhr": [
|
||||
"*"
|
||||
],
|
||||
"usb": [],
|
||||
"web_share": [
|
||||
"*"
|
||||
],
|
||||
"xr_spatial_tracking": [],
|
||||
"clipboard_read": [
|
||||
"*"
|
||||
],
|
||||
"clipboard_write": [
|
||||
"*"
|
||||
],
|
||||
"gamepad": [],
|
||||
"speaker_selection": [],
|
||||
"conversion_measurement": [],
|
||||
"focus_without_user_activation": [
|
||||
"*"
|
||||
],
|
||||
"hid": [],
|
||||
"idle_detection": [
|
||||
"*"
|
||||
],
|
||||
"interest_cohort": [
|
||||
"*"
|
||||
],
|
||||
"serial": [],
|
||||
"sync_script": [],
|
||||
"trust_token_redemption": [],
|
||||
"unload": [
|
||||
"*"
|
||||
],
|
||||
"window_placement": [
|
||||
"*"
|
||||
],
|
||||
"vertical_scroll": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
"DisableHopByHopHeaderRemoval": false
|
||||
},
|
||||
"EnableWebsocketCustomHeaders": false,
|
||||
"AuthenticationProvider": {
|
||||
"AuthMethod": 0,
|
||||
"BasicAuthCredentials": [
|
||||
{
|
||||
"Username": "user",
|
||||
"PasswordHash": "SHA_512_HASHED_PASSWORD"
|
||||
}
|
||||
],
|
||||
"BasicAuthExceptionRules": [
|
||||
{
|
||||
"PathPrefix": "/public/"
|
||||
}
|
||||
],
|
||||
"BasicAuthGroupIDs": null,
|
||||
"AutheliaURL": "",
|
||||
"UseHTTPS": false
|
||||
},
|
||||
"RequireRateLimit": false,
|
||||
"RateLimit": 100,
|
||||
"DisableUptimeMonitor": false,
|
||||
"AccessFilterUUID": "default",
|
||||
"DefaultSiteOption": 0,
|
||||
"DefaultSiteValue": "",
|
||||
"Tags": [
|
||||
"private",
|
||||
"storage",
|
||||
]
|
||||
}
|
||||
```
|
||||
### ProxyType (Host or Vdir)
|
||||
0. Root (Reserved)
|
||||
1. Host
|
||||
2. Vdir
|
||||
|
||||
### Auth Methods (AuthMethod) value
|
||||
0. No auth
|
||||
1. Basic Auth
|
||||
2. Authelia (Experimental)
|
||||
|
||||
|
||||
## Deprecated Structures
|
||||
**This config structure is for Zoraxy v3.0.2 or above**
|
||||
```json
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user