Updated v3.0.2 config file template

Toby Chui 2024-04-25 20:57:28 +08:00
parent 4f681a3d53
commit 338b29135c

@ -1,51 +1,61 @@
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 only**
**This config structure is for Zoraxy v3.0.2 or above**
```json
{
"ProxyType": 1,
"RootOrMatchingDomain": "*.test.yourdomain.com",
"Domain": "192.168.1.100:8080",
"RequireTLS": false,
"BypassGlobalTLS": true,
"SkipCertValidations": true,
"VirtualDirectories": [
{
"MatchingPath": "/example/",
"Domain": "example.com",
"RequireTLS": true,
"SkipCertValidations": false,
"Disabled": false
},
{
"MatchingPath": "/teacat/",
"Domain": "sorae.co",
"RequireTLS": true,
"SkipCertValidations": false,
"Disabled": false
}
],
"UserDefinedHeaders": [
{
"Key": "X-Special-Header",
"Value": "foo=bar"
}
],
"RequireBasicAuth": false,
"BasicAuthCredentials": [
{
"Username": "USERNAME",
"PasswordHash": "PASSWORD_HASH_HERE"
}
],
"BasicAuthExceptionRules": [
{
"PathPrefix": "/public/api/"
}
],
"DefaultSiteOption": 0,
"DefaultSiteValue": "",
"Disabled": false
"ProxyType": 1,
"RootOrMatchingDomain": "a.example.com",
"MatchingDomainAlias": [
"b.example.com",
"c.example.com"
],
"Domain": "target.example.com",
"RequireTLS": true,
"BypassGlobalTLS": true,
"SkipCertValidations": false,
"SkipWebSocketOriginCheck": true,
"VirtualDirectories": [
{
"MatchingPath": "/teacat/",
"Domain": "sorae.co",
"RequireTLS": true,
"SkipCertValidations": false,
"Disabled": false
},
{
"MatchingPath": "/imus/",
"Domain": "imuslab.com",
"RequireTLS": true,
"SkipCertValidations": true,
"Disabled": false
}
],
"UserDefinedHeaders": [
{
"Key": "X-Custom-Header",
"Value": "foo,bar"
}
],
"RequireBasicAuth": false,
"BasicAuthCredentials": [
{
"Username": "test",
"PasswordHash": "PASSWORD_SHA512_HASH_HERE"
},
{
"Username": "user",
"PasswordHash": "PASSWORD_SHA512_HASH_HERE"
}
],
"BasicAuthExceptionRules": [
{
"PathPrefix": "/public/api"
}
],
"AccessFilterUUID": "default",
"Disabled": false,
"DefaultSiteOption": 0,
"DefaultSiteValue": ""
}
```
@ -75,4 +85,5 @@ Here are some key items for the proxy config
- RequireTLS: Proxy target require TLS (https) connection
- BypassGlobalTLS: Allow this rules to be accessed via port 80 endpoint (if enabled)
- SkipCertValidations: Skip proxy target TLS error, for self sign certificate
- SkipWebSocketOriginCheck: Skip websocket origin check, default enable and usually won't cause any security issues
- AccessFilterUUID: The ID of the access rule filter used, must be matching with the "ID" field inside the access config file