gost
gost copied to clipboard
功能增加:ip限速
能够对每个来源ip进行限速
对用户进行限速和限制连接数更好
同求,对每个来源IP限制速度或者连接数。
https://gost.run/concepts/limiter/
its not working : gost -L=ss://AES-256-GCM:password@:4444?limiter.conn.out=250KB&limiter.conn.in=250KB&limiter.in=250KB&limiter.out=250KB i can download up to my bandwidth for example 3 MB per seconds.
hello? any news on this?
Maybe you need to add quotes:
gost -L="ss://AES-256-GCM:password@:4444?limiter.conn.out=250KB&limiter.conn.in=250KB&limiter.in=250KB&limiter.out=250KB"
You can confirm the command by using the '-O yaml':
gost -L="ss://AES-256-GCM:password@:4444?limiter.conn.out=250KB&limiter.conn.in=250KB&limiter.in=250KB&limiter.out=250KB" -O yaml
Outputs:
services:
- name: service-0
addr: :4444
limiter: limiter-0
handler:
type: ss
auth:
username: AES-256-GCM
password: password
listener:
type: tcp
limiters:
- name: limiter-0
limits:
- $ 250KB 250KB
- $$ 250KB 250KB
thank you @ginuerzh for the reply, i will try this
hi @ginuerzh i just tested again
it looks like its just not working when you use -F=...
for example this works :
gost -L="ss://AES-256-GCM:password@:4444?limiter.conn.out=250KB&limiter.conn.in=250KB&limiter.in=250KB&limiter.out=250KB"
but this one doesn't works :
gost -L="ss://AES-256-GCM:password@:4444?limiter.conn.out=250KB&limiter.conn.in=250KB&limiter.in=250KB&limiter.out=250KB" -F=ss://AES-256-GCM:[email protected]:4442
so that's how it supposed to work or its a bug?
how to testing the limiter is work?
using fast.com to testing, the download speed limited , but the upload speed limiter is not work, setup as below
- name: limiter-0
limits:
- '$ 2MB 2MB'
- '$$ 2MB 2MB '
fast.com result
I want to limit the download speed how to set, or how to testing the limiter (input/output) setting is work,
thanks
@zero0o07 You should post the complete configuration you are using here. Do you just create a limiter named "limiter-0", but do not assign it to a service?
@zero0o07 You should post the complete configuration you are using here. Do you just create a limiter named "limiter-0", but do not assign it to a service?
the details as below:
services:
- name: service-0
addr: ":8888"
interface: 100.100.100.194
limiter: limiter-0
handler:
type: auto
auther: auther-0
listener:
type: tcp
authers:
- name: auther-0
auths:
- username: UNAME
password: UPWD
limiters:
- name: limiter-0
limits:
- $ 2MB 2MB
- $$ 2MB 2MB
100.100.100.194
is a fake address,
socks://UNAME:[email protected]:8888
or
http://UNAME:[email protected]:8888
@zero0o07 The key point for this problem is that they are different unit. 1 MB = 1Mb * 8, so you should set like this:
limits:
- $ 0.25MB 0.25MB
- $$ 0.25MB 0.25MB
You can use the scp
command to test the limiter:
Proxy mode:
gost -L ":8080?limiter.conn.in=1MB&limiter.conn.out=2MB&limiter.in=1MB&limiter.out=2MB"
test upload:
scp -o "ProxyCommand=nc -X connect -x localhost:8080 %h %p" ./test.dat user@localhost:~
test download:
scp -o "ProxyCommand=nc -X connect -x localhost:8080 %h %p" user@localhost:~/test.dat .
Port forwarding mode
gost -L "tcp://:2222/:22?limiter.conn.in=1MB&limiter.conn.out=2MB&limiter.in=1MB&limiter.out=2MB"
test upload:
scp -P 2222 ./test.dat user@localhost:~
test download:
scp -P 2222 user@localhost:~/test.dat .