safebrowsing

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2018 License: MIT Imports: 14 Imported by: 0

README

Central proxy server for safebrowsing

Since we use the sotred local database version of the safebrowsing api, we need a central server to query on, we can't have a database on each bot process or node. (would likely run into api quota issues at some point)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSafebrowsingAPIKey = errors.New("no safebrowsing api key provided")

Functions

func CheckString

func CheckString(input string) (*safebrowsing.URLThreat, error)

CheckString checks a string against google safebrowsing for threats if the safebrowser is running on this process then it will perform the check instantly otherwise it will make a api request towards the safebrowsing proxy server (or return an error)

func RegisterPlugin

func RegisterPlugin()

func RunServer

func RunServer() error

func Shutdown

func Shutdown()

Types

type Plugin

type Plugin struct {
}

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) RunBackgroundWorker

func (p *Plugin) RunBackgroundWorker()

func (*Plugin) StopBackgroundWorker

func (p *Plugin) StopBackgroundWorker(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL