Documentation
¶
Index ¶
- Constants
- Variables
- type BridgeSettings
- type CircumventionMap
- type CircumventionSettings
- type MoatDistributor
- func (d *MoatDistributor) GetBridges(transport string, ip net.IP, country string) []string
- func (d *MoatDistributor) GetBuiltInBridges(types []string) map[string][]string
- func (d *MoatDistributor) GetCircumventionDefaults(types []string, ip net.IP, shimToken, country string) (*CircumventionSettings, error)
- func (d *MoatDistributor) GetCircumventionMap() CircumventionMap
- func (d *MoatDistributor) GetCircumventionSettings(country string, types []string, ip net.IP, shimToken string) (*CircumventionSettings, error)
- func (d *MoatDistributor) Init(cfg *internal.Config)
- func (d *MoatDistributor) LoadCircumventionDefaults(r io.Reader) error
- func (d *MoatDistributor) LoadCircumventionMap(r io.Reader) error
- func (d *MoatDistributor) LoadDummyBridges(r io.Reader) error
- func (d *MoatDistributor) Shutdown()
- type Settings
Constants ¶
View Source
const (
DistName = "moat"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BridgeSettings ¶
type CircumventionMap ¶
type CircumventionMap map[string]CircumventionSettings
CircumventionMap maps countries to the CircumventionSettings that ara available on those countries
type CircumventionSettings ¶
type MoatDistributor ¶
type MoatDistributor struct { // FetchBridges gets the list of builtin bridgelines from a remote url // the bridgeLines map is indexed by bridge type FetchBridges func(url string) (bridgeLines map[string][]string, err error) // contains filtered or unexported fields }
func (*MoatDistributor) GetBridges ¶
func (*MoatDistributor) GetBuiltInBridges ¶
func (d *MoatDistributor) GetBuiltInBridges(types []string) map[string][]string
func (*MoatDistributor) GetCircumventionDefaults ¶
func (d *MoatDistributor) GetCircumventionDefaults(types []string, ip net.IP, shimToken, country string) (*CircumventionSettings, error)
func (*MoatDistributor) GetCircumventionMap ¶
func (d *MoatDistributor) GetCircumventionMap() CircumventionMap
func (*MoatDistributor) GetCircumventionSettings ¶
func (d *MoatDistributor) GetCircumventionSettings(country string, types []string, ip net.IP, shimToken string) (*CircumventionSettings, error)
func (*MoatDistributor) Init ¶
func (d *MoatDistributor) Init(cfg *internal.Config)
func (*MoatDistributor) LoadCircumventionDefaults ¶
func (d *MoatDistributor) LoadCircumventionDefaults(r io.Reader) error
func (*MoatDistributor) LoadCircumventionMap ¶
func (d *MoatDistributor) LoadCircumventionMap(r io.Reader) error
func (*MoatDistributor) LoadDummyBridges ¶
func (d *MoatDistributor) LoadDummyBridges(r io.Reader) error
func (*MoatDistributor) Shutdown ¶
func (d *MoatDistributor) Shutdown()
type Settings ¶
type Settings struct {
Bridges BridgeSettings `json:"bridges"`
}
Click to show internal directories.
Click to hide internal directories.