mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 16:01:55 +03:00
Add concurrency parameter
This commit is contained in:
@@ -16,6 +16,7 @@ type Config struct {
|
||||
TCPBuffer TypeBytes `json:"tcp-buffer"`
|
||||
PreferIP TypePreferIP `json:"prefer-ip"`
|
||||
CloakPort TypePort `json:"cloak-port"`
|
||||
Concurrency uint `json:"concurrency"`
|
||||
Defense struct {
|
||||
Time struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
@@ -86,6 +87,7 @@ type configRaw struct {
|
||||
TCPBuffer string `toml:"tcp-buffer" json:"tcp-buffer,omitempty"`
|
||||
PreferIP string `toml:"prefer-ip" json:"prefer-ip,omitempty"`
|
||||
CloakPort uint `toml:"cloak-port" json:"cloak-port,omitempty"`
|
||||
Concurrency uint `toml:"concurrency" json:"concurrency,omitempty"`
|
||||
Defense struct {
|
||||
Time struct {
|
||||
Enabled bool `toml:"enabled" json:"enabled,omitempty"`
|
||||
|
||||
@@ -23,6 +23,10 @@ secret = "ee367a189aee18fa31c190054efd4a8e9573746f726167652e676f6f676c6561706973
|
||||
# Host:port pair to run proxy on.
|
||||
bind-to = "0.0.0.0:3128"
|
||||
|
||||
# Defines how many concurrent connections are allowed to this proxy.
|
||||
# All other incoming connections are going to be dropped.
|
||||
concurrency = 8192
|
||||
|
||||
# A size of user-space buffer for TCP to use. Since we do 2 connections,
|
||||
# then we have tcp-buffer * (4 + 2) per each connection: read/write for
|
||||
# each connection + 2 copy buffers to pump the data between sockets.
|
||||
|
||||
Reference in New Issue
Block a user