Coder Social home page Coder Social logo

Comments (8)

a4501150 avatar a4501150 commented on September 27, 2024 1

Yes it's the same error @sujaldev

from mitmproxy.

mhils avatar mhils commented on September 27, 2024

WireGuard runs over UDP, so I guess that requires some special treatment: https://stackoverflow.com/questions/27596409/how-do-i-publish-a-udp-port-on-docker

In either case, this is very likely Docker idiosyncrasies and not a mitmproxy bug.

from mitmproxy.

a4501150 avatar a4501150 commented on September 27, 2024

Hey @mhils thanks for quick reference,

after change to
docker run --rm -it -v $(pwd):/workspace -p 51820:51820/udp -p 127.0.0.1:8081:8081 mitmproxy/mitmproxy mitmweb --web-host 0.0.0.0 --set block_global=false --set listen_host=0.0.0.0 --mode wireguard -s /workspace/response.py

then got this error in console output:

Failed to process a WireGuard handshake packet: InvalidAeadTag

I still guess it is something related to how wireguard server in mitm handling the udp is somehow not correct when running under docker

from mitmproxy.

sujaldev avatar sujaldev commented on September 27, 2024

Do try running it without your script, perhaps it is responsible for causing this issue.

from mitmproxy.

a4501150 avatar a4501150 commented on September 27, 2024

the script is working fine when running directly

from mitmproxy.

sujaldev avatar sujaldev commented on September 27, 2024

I see, but have you tried running without the script in the container?

from mitmproxy.

a4501150 avatar a4501150 commented on September 27, 2024

I believe it's the error with the private key validations

https://docs.rs/boringtun/latest/src/boringtun/noise/handshake.rs.html

image

from mitmproxy.

sujaldev avatar sujaldev commented on September 27, 2024

Try adding --set confdir=/root/.mitmproxy to the mitmweb command and add make your config persist by adding this to your docker command -v $(pwd)/.mitmproxy:/root/.mitmproxy/ (or use home if you prefer that), like so:

docker run --rm -it -v $(pwd):/workspace -v $(pwd)/.mitmproxy:/root/.mitmproxy/ -p 51820:51820/udp -p 127.0.0.1:8081:8081 mitmproxy/mitmproxy mitmweb --web-host 0.0.0.0 --set block_global=false --set listen_host=0.0.0.0 --mode wireguard -s /workspace/response.py --set confdir=/root/.mitmproxy

And then update your client with the new config.

from mitmproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.