sites

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON_FILE_NAME = "free_vpn_list.json"
)

Variables

View Source
var (
	VPN_MAP = map[string]struct{}{}
)

Functions

func HandleQuery

func HandleQuery(rawUri string) (result string)

func ParseRawUri

func ParseRawUri(rawUri string) (result string)

Types

type IVpnSite

type IVpnSite interface {
	Parse([]byte)
	Run()
}

type Item

type Item struct {
	Address      string `json:"address"`
	Port         int    `json:"port"`
	RawUri       string `json:"raw_uri"`
	Outbound     string `json:"outbound"`
	OutboundType string `json:"outbound_type"`
}

func NewItem

func NewItem(rawUri string) *Item

func (*Item) String

func (that *Item) String() string

type Result

type Result struct {
	Vmess        []string `json:"vmess"`
	Vless        []string `json:"vless"`
	ShadowSocks  []string `json:"shadowsocks"`
	ShadowSocksR []string `json:"shadowsocksR"`
	Trojan       []string `json:"trojan"`
	UpdateAt     string   `json:"update_time"`
}

type Sites

type Sites struct {
	VPNList *Result `json:"vpn_list"`
	// contains filtered or unexported fields
}

func NewSites

func NewSites() (s *Sites)

func (*Sites) GitPush

func (that *Sites) GitPush()

func (*Sites) RegisterSite

func (that *Sites) RegisterSite(ivs IVpnSite)

func (*Sites) Run

func (that *Sites) Run()

func (*Sites) Save

func (that *Sites) Save()

type VPNFromGithub

type VPNFromGithub struct {
	Conf    *conf.Config
	VPNList *Result `json:"vpn_list"`
}

func NewVPNFromGithub

func NewVPNFromGithub(cnf *conf.Config, vpnList *Result) (v *VPNFromGithub)

func (*VPNFromGithub) Parse

func (that *VPNFromGithub) Parse(content []byte)

func (*VPNFromGithub) Run

func (that *VPNFromGithub) Run()

Jump to

Keyboard shortcuts

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