diff options
| author | Fuwn <[email protected]> | 2024-09-11 04:17:38 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-11 04:17:38 -0700 |
| commit | f0f9c3ca189ea7c494b9a3bfdb579a475e27d891 (patch) | |
| tree | 08824e5a0d04e10971c22ab68109b9577b3b0255 | |
| parent | Bump: move networking module (diff) | |
| download | nixos-config-f0f9c3ca189ea7c494b9a3bfdb579a475e27d891.tar.xz nixos-config-f0f9c3ca189ea7c494b9a3bfdb579a475e27d891.zip | |
Bump: i2pd caddy reverse proxy
| -rw-r--r-- | modules/networking/caddy.nix | 9 | ||||
| -rw-r--r-- | modules/networking/default.nix | 1 | ||||
| -rw-r--r-- | modules/networking/i2p.nix | 88 |
3 files changed, 70 insertions, 28 deletions
diff --git a/modules/networking/caddy.nix b/modules/networking/caddy.nix new file mode 100644 index 0000000..e2880db --- /dev/null +++ b/modules/networking/caddy.nix @@ -0,0 +1,9 @@ +{ + services.caddy = { + enable = true; + + virtualHosts."i2pd.localhost".extraConfig = '' + reverse_proxy localhost:7070 + ''; + }; +} diff --git a/modules/networking/default.nix b/modules/networking/default.nix index 724693d..f507ae2 100644 --- a/modules/networking/default.nix +++ b/modules/networking/default.nix @@ -3,6 +3,7 @@ imports = [ ./firewall ./vpn + ./caddy.nix ./dhcpcd.nix ./i2p.nix ./ipv6.nix diff --git a/modules/networking/i2p.nix b/modules/networking/i2p.nix index d94b5e4..f3fbb13 100644 --- a/modules/networking/i2p.nix +++ b/modules/networking/i2p.nix @@ -13,36 +13,68 @@ 4444 ]; - services.i2pd = { - enable = true; - address = "0.0.0.0"; - upnp.enable = true; - bandwidth = 256; - - proto = { - http.enable = true; - socksProxy.enable = true; - sam.enable = true; - i2cp.enable = true; - - httpProxy = { - enable = true; - # outproxy = "http://false.i2p"; - # outproxy = "http://purokishi.i2p:4444"; - # outproxy = "http://outproxy.acetone.i2p:3128"; - outproxy = "http://exit.stormycloud.i2p:4444"; - # outproxy = "http://outproxy.bandura.i2p:4444"; + services.i2pd = + let + address = "0.0.0.0"; + in + { + inherit address; + + enable = true; + upnp.enable = true; + bandwidth = 256; + websocket.address = address; + yggdrasil.address = address; + + proto = { + bob.address = address; + i2pControl.address = address; + + socksProxy = { + inherit address; + + enable = true; + }; + + http = { + inherit address; + + enable = true; + strictHeaders = false; + }; + + i2cp = { + inherit address; + + enable = true; + }; + + sam = { + inherit address; + + enable = true; + }; + + httpProxy = { + inherit address; + + enable = true; + # outproxy = "http://false.i2p"; + # outproxy = "http://purokishi.i2p:4444"; + # outproxy = "http://outproxy.acetone.i2p:3128"; + outproxy = "http://exit.stormycloud.i2p:4444"; + # outproxy = "http://outproxy.bandura.i2p:4444"; + }; }; - }; - addressbook.subscriptions = [ - "http://inr.i2p/export/alive-hosts.txt" - "http://i2p-projekt.i2p/hosts.txt" - "http://stats.i2p/cgi-bin/newhosts.txt" - "http://reg.i2p/export/hosts.txt" - "http://notbob.i2p/hosts.txt" - ]; - }; + addressbook.subscriptions = [ + "http://inr.i2p/export/alive-hosts.txt" + "http://i2p-projekt.i2p/hosts.txt" + "http://stats.i2p/cgi-bin/newhosts.txt" + "http://reg.i2p/export/hosts.txt" + "http://notbob.i2p/hosts.txt" + ]; + }; }; }; } |