The module parser is a feature that allows you to convert modules from other apps to LanceX’s format. We list the directives that we support.
sgmodule
General
- force-http-engine-hosts
Rule
- DOMAIN
- DOMAIN-SUFFIX
- DOMAIN-KEYWORD
- IP-CIDR
- IP-CIDR6
- GEOIP
- IP-ASN
- URL-REGEX
- USER-AGENT
- AND/OR/NOT
- FINAL
- REJECT
- REJECT-DROP
Rewrite
- 302
- reject
- reject-200
- reject-img
- reject-dict
- reject-array
- header
- header-add
- header-del
- header-replace
- header-replace-regex
Body Rewrite
- http-request
- http-response
Map Local
Local mapping is supported, but the data file must be remote currently
Script
- http-request
- http-response
loon
Rule
- DOMAIN
- DOMAIN-SUFFIX
- DOMAIN-KEYWORD
- IP-CIDR
- IP-CIDR6
- GEOIP
- IP-ASN
- URL-REGEX
- USER-AGENT
- AND/OR/NOT
- FINAL
Rewrite
- 302
- reject
- reject-200
- reject-img
- reject-dict
- reject-array
- header-add
- header-del
- header-replace
- header-replace-regex
- request-body-replace-regex
- request-body-json-jq
request-body-json-addrequest-body-json-replacerequest-body-json-delmock-request-body- response-header-add
- response-header-del
- response-header-replace
- response-header-replace-regex
- response-body-replace-regex
response-body-json-addresponse-body-json-replaceresponse-body-json-del- response-body-json-jq
mock-response-body
Script
- http-request
- http-response