mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-26 22:31:35 +00:00
feat(cli): Add bandwidth limit function support
Added bandwidth limiting functionality, allowing users to limit the bandwidth of tunnel connections via the --bandwidth parameter. Supported formats include: 1K/1KB (kilobytes), 1M/1MB (megabytes), 1G/1GB (gigabytes) or Raw number (bytes).
This commit is contained in:
@@ -27,6 +27,7 @@ type RegisterRequest struct {
|
||||
PoolCapabilities *PoolCapabilities `json:"pool_capabilities,omitempty"`
|
||||
IPAccess *IPAccessControl `json:"ip_access,omitempty"`
|
||||
ProxyAuth *ProxyAuth `json:"proxy_auth,omitempty"`
|
||||
Bandwidth int64 `json:"bandwidth,omitempty"` // Bandwidth limit (bytes/sec), 0 = unlimited
|
||||
}
|
||||
|
||||
type RegisterResponse struct {
|
||||
@@ -37,6 +38,7 @@ type RegisterResponse struct {
|
||||
TunnelID string `json:"tunnel_id,omitempty"`
|
||||
SupportsDataConn bool `json:"supports_data_conn,omitempty"`
|
||||
RecommendedConns int `json:"recommended_conns,omitempty"`
|
||||
Bandwidth int64 `json:"bandwidth,omitempty"` // Applied bandwidth limit (bytes/sec)
|
||||
}
|
||||
|
||||
type DataConnectRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user