airdcpp-web / airdcpp-webclient

Communal peer-to-peer file sharing application for file servers/NAS devices
https://airdcpp-web.github.io
171 stars 31 forks source link

Masking IP address #398

Closed denppa closed 2 years ago

denppa commented 3 years ago

Sorry dev for my previous rather dumb questions, much research went into it and here is what I really need help with at the end.

What is a way for me to mask my IP address browsing in public hubs while maintaining an active profile at the same time?

Proxy masks me quite well but in turn I can only be passive as is what I read in the airdc web page.

Vpn straight up makes me unable to open file lists and search. Is there a preferred vpn provider or a way to make it work with air if I plan to self host it?

denppa commented 3 years ago

Yeah I have no idea how to maintain an active connection with a VPN either, welcome to any future passers to offer their ideas here.

maksis commented 3 years ago

Unfortunately I'm not using SOCKS5 or any VPN services so I'm not that familiar with the subject. I'm seeing VPN users that are using active mode though so I assume that it's possible to accomplish. I'd recommend keeping the issue open if you want people to offer their ideas.

denppa commented 3 years ago

Okay then if you are fine with it dev.

So if you are a vpn user and are able to get to active mode, please let me know what kind of service and or settings you used to achieve that.

Any ideas offered is appreciated!

peps1 commented 3 years ago

The easiest way should be VPN, if the VPN provider offers port forwarding. Then you just have to forward the ports used by AirDC.

SOCKS5 itself it's not possible i would say. SOCKS5 is only a proxy, so in this case, connections are only outgoing. For active connections you need incoming connections. So incoming connections would need to be handled by for example iptables to pass the connection through the IP where SOCKS5 is hosted and to your client using NAT and masquerading. Probably similar to what you did for the Wireguard setup here: https://github.com/airdcpp-web/airdcpp-webclient/issues/397 So far the theory, but i haven't actually been able to get this to work.

Now that i'm thinking about it, i'm wondering if it would work with running another proxy for the incoming connections. It shouldn't use SOCKS5, but something like HAProxy (doesn't really support UDP) or nginx might work, when running in TCP/UDP mode, might work?

denppa commented 3 years ago

The easiest way should be VPN, if the VPN provider offers port forwarding. Then you just have to forward the ports used by AirDC.

SOCKS5 itself it's not possible i would say. SOCKS5 is only a proxy, so in this case, connections are only outgoing. For active connections you need incoming connections. So incoming connections would need to be handled by for example iptables to pass the connection through the IP where SOCKS5 is hosted and to your client using NAT and masquerading. Probably similar to what you did for the Wireguard setup here: #397 So far the theory, but i haven't actually been able to get this to work.

Now that i'm thinking about it, i'm wondering if it would work with running another proxy for the incoming connections. It shouldn't use SOCKS5, but something like HAProxy (doesn't really support UDP) or nginx might work, when running in TCP/UDP mode, might work?

Alright, I am finally back after some hashing and file moving. First of all thank you @peps1 for replying, I dunno of another way of mentioning someone specifically that gives them a email/ping except by quoting their entire message. Or does @someone also achieves the same purpose?

Anyways, so if what I read was correct, does that mean you have personally purchased a vpn with that, connected to and, forwarded the ports and got to be active? If so, can I get the name of the service?

So far I have tried mullvard, didn't work; setting up my own to no avail since I don't know of how to forward the ports in vpn settings.

Second of all, I do want to know, are the three ports chosen here: https://i.imgur.com/XIHJdqn.png

I have heard of people using only two ports, but combining both the TCP and TLS/TCP ports into one. Does that still get me an active mode?

I am forwarding only the first port I have chosen in my router, so active with manual is not possible. I am using client configure right now to be active.

Does that mean I need to forward all the ports shown here? And did my method of reducing the three to one by combining those two ports work or should I instead combine the TCP with UDP?

peps1 commented 3 years ago

@Horuyuki I haven't actually tried the VPN part, but i don't see why it shouldn't work. Currently I don't have a VPN provider that allows port forwarding.

Yes you should forward all 3 ports there, and at least for testing i would use a separate port for each of those.

denppa commented 3 years ago

@peps1 So at long last you have replied and I also got a answer to this a few days ago: https://serverfault.com/questions/1067746/port-forwarding-with-wireguard

So now my self hosted vpn and forward ports and bring airdc online.

Which are the ports I can combine so I don't have to forward all three?

denppa commented 2 years ago

So to all who are interested in using their own VPN.

Go read the questions I asked on serverfault, they would solve your problems!