MCPcopy Create free account
hub / github.com/eventure/hide.client.linux / ApplyFilter

Method ApplyFilter

rest/client.go:279–284  ·  view source on GitHub ↗
( ctx context.Context )

Source from the content-addressed store, hash-verified

277func ( c *Client ) ApplyFilter( ctx context.Context ) ( err error ) {
278 if err = c.Config.Filter.Check(); err != nil { return }
279 response, err := c.postJson( ctx, "https://10.255.255.250:4321/filter", c.Config.Filter )
280 if string(response) == "false" { err = errors.New( "filter failed" ) }
281 return
282}
283
284func ( c *Client ) EnablePortForwarding( ctx context.Context ) ( err error ) {
285 response, err := c.postJson( ctx, "https://10.255.255.250:4321/upnp", c.Config.PortForward )
286 if string(response) == "false" { err = errors.New( "port-forwarding failed" ) }
287 return

Callers 1

FilterMethod · 0.80

Calls 2

postJsonMethod · 0.95
CheckMethod · 0.45

Tested by

no test coverage detected