MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / NewClient

Function NewClient

internal/tui/client.go:22–30  ·  view source on GitHub ↗

NewClient creates a new management API client.

(port int, secretKey string)

Source from the content-addressed store, hash-verified

20
21// NewClient creates a new management API client.
22func NewClient(port int, secretKey string) *Client {
23 return &Client{
24 baseURL: fmt.Sprintf("http://127.0.0.1:%d", port),
25 secretKey: strings.TrimSpace(secretKey),
26 http: &http.Client{
27 Timeout: 10 * time.Second,
28 },
29 }
30}
31
32// SetSecretKey updates management API bearer token used by this client.
33func (c *Client) SetSecretKey(secretKey string) {

Callers 2

mainFunction · 0.92
NewAppFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected