Specify the bind port directly
It's not a secret, and this will make it possible to use the address/interface configured in the host configuration.
This commit is contained in:
parent
010cabfe14
commit
d739394ae2
2 changed files with 8 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
|||
# frps.toml
|
||||
auth.method = "token"
|
||||
auth.token = "{{ .Envs.FRPS_AUTH_TOKEN }}"
|
||||
bindAddr = "{{ .Envs.FRPS_BIND_ADDRESS }}"
|
||||
bindPort = {{ .Envs.FRPS_BIND_PORT }}
|
||||
vhostHTTPPort = {{ .Envs.FRPS_VHOST_HTTP_PORT }}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ let
|
|||
group = "frps";
|
||||
user = "frps";
|
||||
in {
|
||||
options.myModules.frps.enable = mkEnableOption "custom frps configuration";
|
||||
options.myModules.frps = {
|
||||
enable = mkEnableOption "custom frps configuration";
|
||||
};
|
||||
config = mkIf config.myModules.frps.enable {
|
||||
environment = {
|
||||
etc."frps.toml".source = "${configFiles}/frps/frps.toml";
|
||||
|
|
@ -24,11 +26,15 @@ in {
|
|||
systemd.services.frps = {
|
||||
after=["network.target" "network-online.target"];
|
||||
description="FRP server process";
|
||||
environment = {
|
||||
FRPS_BIND_PORT="7000";
|
||||
FRPS_VHOST_HTTP_PORT="8000";
|
||||
};
|
||||
requires=["network-online.target"];
|
||||
restartIfChanged = true;
|
||||
stopIfChanged = true;
|
||||
serviceConfig = {
|
||||
EnvironmentFile="/var/run/secrets/frps-env";
|
||||
EnvironmentFile = "/var/run/secrets/frps-env";
|
||||
Type = "simple";
|
||||
User = "${user}";
|
||||
Group = "${group}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue