tangled
alpha
login
or
join now
devins.page
/
flake
0
fork
atom
configurations for my servers and desktops
nix
nixos
flake
dots
dotfiles
0
fork
atom
overview
issues
pulls
pipelines
fix: bro idk
devins.page
1 month ago
040249a5
f59e87c0
+3
-1
1 changed file
expand all
collapse all
unified
split
hosts
bluepill-proxy
modules
socat.nix
+3
-1
hosts/bluepill-proxy/modules/socat.nix
···
1
1
{pkgs, ...}: {
2
2
networking.firewall = {
3
3
+
enable = true;
3
4
allowedTCPPorts = [25565 23343];
4
5
allowedUDPPorts = [25565 23343 24454 22232];
5
6
};
···
10
11
after = ["network-online.target"];
11
12
serviceConfig = {
12
13
ExecStart = ''
13
13
-
sh -c "
14
14
+
${pkgs.bash}/bin/bash -c "
14
15
${pkgs.socat}/bin/socat TCP-LISTEN:25565,reuseaddr,fork TCP:100.108.47.83:25565 &
15
16
${pkgs.socat}/bin/socat UDP-LISTEN:25565,reuseaddr,fork UDP:100.108.47.83:25565 &
16
17
${pkgs.socat}/bin/socat UDP-LISTEN:24454,reuseaddr,fork UDP:100.108.47.83:24454 &
···
18
19
${pkgs.socat}/bin/socat TCP-LISTEN:23343,reuseaddr,fork TCP:100.108.47.83:23343 &
19
20
${pkgs.socat}/bin/socat UDP-LISTEN:23343,reuseaddr,fork UDP:100.108.47.83:23343 &
20
21
${pkgs.socat}/bin/socat UDP-LISTEN:22232,reuseaddr,fork UDP:100.108.47.83:22232 &
22
22
+
21
23
wait
22
24
"
23
25
'';