go-gost / gost

GO Simple Tunnel - a simple tunnel written in golang
https://gost.run
MIT License
4.2k stars 511 forks source link

[Feauture Request] Adding support for port-based limiter #141

Open xzycn opened 1 year ago

xzycn commented 1 year ago

Now, we can create a limiter scope for IP or CIDR, can we support port?

xzycn commented 1 year ago

Yes, I have found we can treat a service(addr field) and a limiter as a port-based limiter.

Normally, we see the model :

image such as Port Forwarding.

another model: image

such as transparent proxy (redirect in linux).

How do I use a port-based limiter when everyone connect to one service?

ginuerzh commented 1 year ago

What kind of limiter, traffic limiter, rate limiter, or connection limiter?

xzycn commented 1 year ago

@ginuerzh traffic limiter.

ginuerzh commented 1 year ago

Ports can not be used to distinguish users, the client port is dynamic.

xzycn commented 1 year ago

@ginuerzh I mean the destination port(get from getOriginalDstAddr) instead of client port :)