mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
519d7b3841
Signed-off-by: Magic_RB <magic_rb@redalder.org>
19 lines
406 B
Nix
19 lines
406 B
Nix
{ pkgs, ... }:
|
|
{
|
|
systemd.services.udp2tcp = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network.target" ];
|
|
|
|
restartIfChanged = true;
|
|
|
|
path = with pkgs; [ dig.host ];
|
|
|
|
script = ''
|
|
${pkgs.udp-over-tcp}/bin/tcp2udp\
|
|
--tcp-listen 127.0.0.1:6001 \
|
|
--tcp-listen "$(host redalder.org | sed -e 's/.* //'):6001" \
|
|
--udp-forward 127.0.0.1:6666
|
|
'';
|
|
};
|
|
}
|