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

Define a specific standard for HTTP localhost proxies, or browser extensions, to enable advanced browser features? #745

Closed
EternityForest opened this issue Nov 20, 2020 · 7 comments

Comments

@EternityForest
Copy link

The full mesh encryption is great, but unfortunately, it seems that browsers do not care at all, and won't be treating Yggdrasil IP addresses as trusted anytime soon.

Perhaps a browser extension could be written, assuming no further nerfing happens, but a proxy also has a few other advantages, like working in any browser, like chrome mobile which lacks extensions.

I propose a standard for encoding both the port and IP into base64, and packing this into a subdomain of a proxy server, giving every mesh host a corresponding equivalent on a trusted localhost(On a random IP that's unlikely to conflict, like 127.5.9.12) but isolated with it's own subdomain.

This way, no self-signed certificate hackery is required to use the advanced features, many of which(like WebRTC and service workers) may be very important for a p2p future whee nodes spend a lot of time offline.

Especially if such a proxy was built directly into the main process itself, and widely accepted, it would make linking and sharing sites a lot easier.

It would also create an alternative to DNS that doesn't include any blockchains, which cause problems on limited storage. "Namefiles" could be shared that map from human readable localhost subdomains, to IPFS mesh names, similar to exchanging PGP keys.

This seems like something you'd want user-level control over, rather than using a system level daemon, but desktops are almost all single user anyway, and perhaps adding a new trusted site should involve the moment's pause that typing your sudo password gives(Or maybe it would only make people take sudo less seriously? Human factors is hard!).

The management app could eventually serve other purposes as well, like discovering and "pairing with" sites with things like QR codes that have the name mapping.

But in any case, the core functionality of HTTP proxying via subdomains would enable a lot of new use cases.

@neilalexander
Copy link
Member

The main reason why Yggdrasil has never done anything regarding proxying like this is because, today, there's an expectation that most traffic carried over the Yggdrasil Network is indeed IPv6-encapsulated. If we add listeners for SOCKS proxying then we pretty much need to add the major workings of an IP stack into Yggdrasil to provide that encapsulation/decapsulation, otherwise the SOCKS node just won't be able to talk to anything else and that renders it largely useless.

This is far more complexity than we want to own and is quite far out-of-scope for the project.

@cofob
Copy link
Contributor

cofob commented Oct 4, 2021

Proxies do not need to process anything other than domains like <publickey>.yggip and ipv6 addresses. It can be used in conjunction with FoxyProxy for Firefox, for example.

@neilalexander
Copy link
Member

The problem is that we'd need to implement an IPv6 stack and a TCP stack inside Yggdrasil in order for proxy nodes and IP nodes to talk to each other. Otherwise it's practically useless.

@ccaapton
Copy link

@neilalexander I also hope something like this to happen. The TCP stack could be done by leveraging tun2socks libraries, for instance . Would you have a look?

@neilalexander
Copy link
Member

@neilalexander I also hope something like this to happen. The TCP stack could be done by leveraging tun2socks libraries, for instance . Would you have a look?

For what it's worth, I actually did some experimenting with the gvisor userspace networking stack and Yggdrasil — it's on the netstack branch and allows running Yggdrasil as a SOCKS proxy instead of using a TUN adapter. The problem is that it needs patches upstream and I don't have the time to commit to it (the gvisor code is a mess).

@pufferffish
Copy link
Contributor

@neilalexander I also hope something like this to happen. The TCP stack could be done by leveraging tun2socks libraries, for instance . Would you have a look?

For what it's worth, I actually did some experimenting with the gvisor userspace networking stack and Yggdrasil — it's on the netstack branch and allows running Yggdrasil as a SOCKS proxy instead of using a TUN adapter. The problem is that it needs patches upstream and I don't have the time to commit to it (the gvisor code is a mess).

I'm looking for this exact feature and I was planning to make a pull request that uses netstack to let yggdrasil runs in userspace before I saw this comment. What exactly were the problems you ran into? I'm happy to contribute.

@EternityForest
Copy link
Author

EternityForest commented Jun 14, 2023 via email

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

5 participants