chaitin / SafeLine

serve as a reverse proxy to protect your web services from attacks and exploits.
https://waf.chaitin.com
GNU General Public License v3.0
12.08k stars 752 forks source link

[SUGGESTION] Add some TCP protocols instead of HTTP #975

Closed plumsydev closed 2 months ago

plumsydev commented 3 months ago

Hi! I've got a suggestion, currently using SafeLine with some additional IPs on a VPS to make a "load balancer" so they cannot simply hit the VPS IP and everything goes down. So exemple

blabla.com -> backend 1.1.1.1 port 80 -> vhost managed by safeline to redirect from 2.2.2.2 port 80 to 1.1.1.1 port 80

(Here, basic exemple of the SafeLine work)

The suggestion would be

test.blabla.com -> backend 1.1.1.1 port 80 -> safeline-vps-ip port 1339

This would be useful to proxy some SSH servers, Minecraft servers etc ! :)

Thanks for reading this, i hope this functionality will be added ! <3 plumsy.dev

Lvshujun0918 commented 3 months ago

But in that case, Safeline cannot check the content of connection, cannot work as an WAF. If you want to do this, why not use other software, since Safeline doesn't design for it I think.

plumsydev commented 3 months ago

But in that case, Safeline cannot check the content of connection, cannot work as an WAF. If you want to do this, why not use other software, since Safeline doesn't design for it I think.

Yeah that's the thing, Safeline could be more than a WAF if they want to, that's why i asked :)

Lorna0 commented 2 months ago

Sorry but don't quite understand your example. what do you mean by 'backend 1.1.1.1 port 80...would be useful to proxy some SSH servers' ? cus 80 is usually a http port I think.

For reference, We have got these requests:

plumsydev commented 2 months ago

I don't freaking speak chinese xDD And the port 80 was just an exemple but like, the only thing i asked was to also support tcp protocols so add a domain like "ssh.plumsy.dev" with backend port 22 but make it redirect to port 1448 for exemple, like some haproxy thing or idk, this could be useful to proxy minecraft servers

Lorna0 commented 2 months ago

I don't freaking speak chinese xDD And the port 80 was just an exemple but like, the only thing i asked was to also support tcp protocols so add a domain like "ssh.plumsy.dev" with backend port 22 but make it redirect to port 1448 for exemple, like some haproxy thing or idk, this could be useful to proxy minecraft servers

Sounds like the same issue as #123 . It's ok if don't know chinese, but it's a bit troublesome to manage issue in two language separately. I will try my best to update some English info in #123 (and other hot chinese issue later). You can click a 👍 in #123 to show your approval.

close as duplicated.

Lorna0 commented 2 months ago

btw if you have other feedback and can't find a English issue, it's ok to create a new directly. we will mark it if there is already a duplicate Chinese one.