-[Improved File Manager (IFM)](https://github.com/misterunknown/ifm), a single-file web-based file manager. Available as [services.ifm](options.html#opt-services.ifm.enable).
-[OpenGFW](https://github.com/apernet/OpenGFW), an implementation of the Great Firewall on Linux. Available as [services.opengfw](#opt-services.opengfw.enable).
-[OpenGFW](https://github.com/apernet/OpenGFW), an implementation of the Great Firewall on Linux. Available as `services.opengfw`.
-[Rathole](https://github.com/rapiz1/rathole), a lightweight and high-performance reverse proxy for NAT traversal. Available as [services.rathole](#opt-services.rathole.enable).
The path to load specific local geoip/geosite db files.
If not set, they will be automatically downloaded from [Loyalsoldier/v2ray-rules-dat](https://github.com/Loyalsoldier/v2ray-rules-dat).
'';
default={};
type=types.submodule{
options={
geoip=mkOption{
description="Path to `geoip.dat`.";
default=null;
type=types.nullOrtypes.path;
};
geosite=mkOption{
description="Path to `geosite.dat`.";
default=null;
type=types.nullOrtypes.path;
};
};
};
};
workers=mkOption{
default={};
description="Worker settings.";
type=types.submodule{
options={
count=mkOption{
type=types.int;
description=''
Number of workers.
Recommended to be no more than the number of CPU cores
'';
default=4;
example=8;
};
queueSize=mkOption{
type=types.int;
description="Worker queue size.";
default=16;
example=32;
};
tcpMaxBufferedPagesTotal=mkOption{
type=types.int;
description=''
TCP max total buffered pages.
'';
default=4096;
example=8192;
};
tcpMaxBufferedPagesPerConn=mkOption{
type=types.int;
description=''
TCP max total bufferd pages per connection.
'';
default=64;
example=128;
};
tcpTimeout=mkOption{
type=types.str;
description=''
How long a connection is considered dead when no data is being transferred.
Dead connections are purged from TCP reassembly pools once per minute.
'';
default="10m";
example="5m";
};
udpMaxStreams=mkOption{
type=types.int;
description="UDP max streams.";
default=4096;
example=8192;
};
};
};
};
};
}
);
};
rules=mkOption{
default=[];
description=''
Rules passed to OpenGFW. [Example rules](https://gfw.dev/docs/rules)
'';
type=types.listOf(
types.submodule{
options={
name=mkOption{
description="Name of the rule.";
example="block google dns";
type=types.singleLineStr;
};
action=mkOption{
description=''
Action of the rule. [Supported actions](https://gfw.dev/docs/rules#supported-actions)
'';
default="allow";
example="block";
type=types.enum[
"allow"
"block"
"drop"
"modify"
];
};
log=mkOption{
description="Whether to enable logging for the rule.";
default=true;
example=false;
type=types.bool;
};
expr=mkOption{
description=''
[Expr Language](https://expr-lang.org/docs/language-definition) expression using [analyzers](https://gfw.dev/docs/analyzers) and [functions](https://gfw.dev/docs/functions).