Created
May 3, 2025 10:21
-
-
Save FATESAIKOU/7e43cda9f9d7475f60c8be2f8f75253f to your computer and use it in GitHub Desktop.
Monitor arbitrary port(example: mcphost)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install mitmproxy | |
$ pipx install mitmproxy | |
# edit iptable | |
$ sudo iptables -t nat -A OUTPUT -p tcp --dport 11434 -j REDIRECT --to-port <mitmproxy listen port> | |
# launch mitmproxy | |
$ mitmproxy --mode reverse:http://127.0.0.1:<ollama port> --listen-port <mitmproxy listen port> | |
# change ollama default port | |
$ sudo vim /etc/systemd/system/ollama.service | |
# launch mcphost | |
$ mcphost -m ollama:qwen2.5:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alternative: ngrep, httptoolkit