Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What local IP address to use #8

Open
zner0L opened this issue Mar 21, 2023 · 5 comments
Open

What local IP address to use #8

zner0L opened this issue Mar 21, 2023 · 5 comments

Comments

@zner0L
Copy link
Contributor

zner0L commented Mar 21, 2023

When we set up the proxy in cyanoacrylate on a physical device, we need to know an IP address at which the device can reach the host. While it does seem easy enough to get the local IP addresses of the host (https://stackoverflow.com/questions/3653065/get-local-ip-address-in-node-js), it is not unlikely that there is more than one interface available, e.g. WiFi and ethernet.
I see two ways to go about this:

  • Let the users determine the correct IP address/interface and provide it in the analysis setup
  • Test all available (and connected) interfaces if they can reach the host by pinging them from the device

I think I like the second option better. What do you think?

@baltpeter
Copy link
Member

How about option 3: Only support WireGuard in cyanoacrylate, which just works?

I know we don't have iOS support for that yet in appstraction, but I'm not sure whether it's worth putting in all this effort for supporting an option that is clearly inferior anyway.

@zner0L
Copy link
Contributor Author

zner0L commented Mar 21, 2023

Hm, I guess. In the emulator as well? I am also not sure what to do about the emulator proxy since that is easy and reliable…

@baltpeter
Copy link
Member

In the emulator as well?

If it works, why not? If you do a traffic collection on an app, it should only record that app's traffic and WireGuard is the only way we have to do that, anyway.

@zner0L
Copy link
Contributor Author

zner0L commented Mar 21, 2023

Well, because we cannot read from the stdout properly, we still have the problem in that case, because we need to generate the wireguard config ourselves. mitmproxy only stores the keys in the .mitmproxy/wireguard.conf (https://docs.mitmproxy.org/stable/concepts-modes/#wireguard-server).

@baltpeter
Copy link
Member

Yes. But we do have to solve that anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants