Skip to content

Instantly share code, notes, and snippets.

@will
Created March 18, 2025 14:08
Show Gist options
  • Save will/d42cdaaefcf80ccffbc64f2f02e5b85c to your computer and use it in GitHub Desktop.
Save will/d42cdaaefcf80ccffbc64f2f02e5b85c to your computer and use it in GitHub Desktop.
nftables mitmproxy nixos
block_global: false
ssl_insecure: true
connection_strategy: lazy
keep_alive: false
# assume uid 1000 runs mitmproxy, all other user's (eg root) traffic will be routed through mitmproxy
{
# found in ~/.mitmproxy/ after running it once
security.pki.certificateFiles = [ ./mitmproxy-ca-cert.pem ];
# networking.nftables.ruleset = ''
# table ip filter {
# chain mitmproxy {
# type nat hook output priority -100; policy accept;
# ip protocol tcp meta skuid 1000 return
# ip protocol tcp tcp dport 443 redirect to 8080
# }
# }
#
# table ip6 filter {
# chain mitmproxy {
# type nat hook output priority -100; policy accept;
# ip6 nexthdr tcp meta skuid 1000 return
# ip6 nexthdr tcp tcp dport 443 redirect to 8080
# }
# }
# '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment