Zapret : Add xray.
This commit is contained in:
parent
ac5c73f7eb
commit
f485aa0e1c
|
@ -18,11 +18,30 @@ in {
|
|||
default = 9150;
|
||||
type = types.int;
|
||||
};
|
||||
xrayport = mkOption {
|
||||
default = 1081;
|
||||
type = types.int;
|
||||
};
|
||||
storage = mkOption {
|
||||
default = "${config.container.storage}/zapret";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = container.mkContainerDir cfg [
|
||||
"data"
|
||||
];
|
||||
|
||||
containers.zapret = container.mkContainer cfg {
|
||||
bindMounts = {
|
||||
"/data" = {
|
||||
hostPath = "${cfg.storage}/data";
|
||||
isReadOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = { ... }: container.mkContainerConfig cfg {
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.conf.all.src_valid_mark" = 1;
|
||||
|
@ -75,6 +94,11 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
xray = {
|
||||
enable = true;
|
||||
settingsFile = "/data/Client.json";
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
|
|
Loading…
Reference in a new issue