Doing a little house cleaning today on my "Projects" directory and found this
https://github.com/hzrd149/hyper-http-proxy
Its a HTTP Proxy server for #hyperdht #holepunch.
This would be really cool to finish, because it would allow almost any app to start talking to hyper servers without needing to integrate hyperdht directly. similar to how #tor and #i2p proxies work :)
Unfortunately it has a bug, I wasn't able to get the built-in nodejs socket to connect to the hyperdht socket
This was a learning project for me so I don't really know what I'm doing with sockets and pipes. which is why I never got it working
The bug is here https://github.com/hzrd149/hyper-http-proxy/blob/master/src/agent.ts#L21-L63
Anyways, I don't have time right now to finish this. So if your someone who wants to play with #holepunch or knows a lot about Nodejs then maybe this is a good project to start with?
If no one wants to do it for free (understandable) I'm willing to pay 100k sats to the first person who fixes this project or creates a HTTP proxy that fits these requirements
- Runs on linux and takes less than 3-4 commands to setup
- Runs in docker (needed for start9 and Umbrel)
- Able to proxy HTTP requests to a holesail server
- Easiest way to test this is using "curl.hyper --proxy http://localhost:3128"
- (optional) http auth for the proxy
Reply here or send me a DM if you need more details
So without further ado I present to you Hyper SOCKS5 Proxy
This is a SOCKS v5 proxy server that can automatically connect to HyperDHT node and Holesail servers. This is cool because it lets any application that already supports SOCKS5 or HTTP proxies ( mainly web browsers ) to connect to hyper nodes
Let me show you can example
First we have to startup a http server and use holesail to make it available on hyper
Next, on a different machine we can connect to it using hyper-socks5-proxy and configure FireFox to use the proxy
NOTE: besides this example ( tested on my LAN ) I have not tested anything else. but in theory it should be possible to host relays over hyperdht
The reason I had to convert the hex connection string ( hyperdht pubkey ) into a bech32 address was because the maximum length for a domain name is 63 characters. and the connection string is 64...
But encoding it to bech32 with a 4 character prefix makes it only 58. Its identical to how nostr npubs are encoded
Anyways here are the links to the code if you want to play around with it
https://github.com/hzrd149/hyper-address ( https://hzrd149.github.io/hyper-address/ )
https://github.com/hzrd149/hyper-socks5-proxy
https://github.com/hzrd149/hyper-http-proxy
This is also available on my custom umbrel app store. If for some crazy reason you want to run my untested code on your lightning node ( please don't )
https://github.com/hzrd149/umbrel-community-app-store
#pear #hyperdht #holesail #proxy #socks5