@ Symbol Usage
Using the @ symbol in rules is useful when you want to store rules on a remote server or in a local project file and have Whistle automatically synchronize updates; or when the server requires mutual authentication (mTLS).
Importing a rule file (@path)
Function: Dynamically load the contents of an external rule file (supports automatic refresh)
Format: @filepathorurl
Supported types:
- Remote URL:
@https://example.com/rules.txt - Local file:
@~/projects/rules.txt(supports all operating system paths) - Plugin interface:
@whistle.nohost/api/rules(requires plugin implementation)
Windows paths can use a mix of / and :
txt@C:/whistle/rules.txt @D:\config\proxy.rules
Configuring the client certificate (@clientCert://)
Function: Specify a client certificate for mutual authentication (mTLS) requests
Recommend switching to the tlsOptions configuration option
Format:
txt
@clientCert://key=private key path&cert=cert or pem certificate path
or
@clientCert://pwd=passphrase&cert=pfx or p12 certificate pathSupported types:
txt
# cert format certificate
pattern @clientCert://key=/User/xxx/test.key&cert=/User/xxx/test.crt
# pem format certificate
pattern @clientCert://key=E:\test.pem&cert=E:\test.pem
# pfx format certificate
pattern @clientCert://pwd=passphrase&pfx=/User/xxx/test.pfx
# p12 format certificate
pattern @clientCert://pwd=passphrase&pfx=E:/test.p12Windows paths can use a mix of / and \