Coder Social home page Coder Social logo

功能增加:ip限速 about gost HOT 14 CLOSED

go-gost avatar go-gost commented on June 22, 2024
功能增加:ip限速

from gost.

Comments (14)

ginuerzh avatar ginuerzh commented on June 22, 2024 1

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 .

from gost.

enp6 avatar enp6 commented on June 22, 2024

对用户进行限速和限制连接数更好

from gost.

sxchxdc avatar sxchxdc commented on June 22, 2024

同求,对每个来源IP限制速度或者连接数。

from gost.

ginuerzh avatar ginuerzh commented on June 22, 2024

https://gost.run/concepts/limiter/

from gost.

benyamin218118 avatar benyamin218118 commented on June 22, 2024

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.

from gost.

benyamin218118 avatar benyamin218118 commented on June 22, 2024

hello? any news on this?

from gost.

ginuerzh avatar ginuerzh commented on June 22, 2024

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

from gost.

benyamin218118 avatar benyamin218118 commented on June 22, 2024

thank you @ginuerzh for the reply, i will try this

from gost.

benyamin218118 avatar benyamin218118 commented on June 22, 2024

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

from gost.

benyamin218118 avatar benyamin218118 commented on June 22, 2024

so that's how it supposed to work or its a bug?

from gost.

zero0o07 avatar zero0o07 commented on June 22, 2024

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
2023-03-08 12 56 44

I want to limit the download speed how to set, or how to testing the limiter (input/output) setting is work,

thanks

from gost.

xzycn avatar xzycn commented on June 22, 2024

@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?

from gost.

zero0o07 avatar zero0o07 commented on June 22, 2024

@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

from gost.

xzycn avatar xzycn commented on June 22, 2024

@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

from gost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.