Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigFileName string = "neobox_conf.json" LogFileName string = "neobox.log" DownloadedFileName string = "neobox_vpns_encrypted.txt" DecryptedFileName string = "neobox_vpns_decrypted.json" PingSucceededFileName string = "neobox_ping_succeeded.json" VerifiedFileName string = "neobox_verified.json" CountryAbbrFileName string = "neobox_country_abbr.json" SQLiteDBFileName string = "neobox_sqlite.db" EncryptKeyFileName string = ".neobox_encrypt_key.json" DefaultKey string = "5lR3hcN8Zzpo1nzI" CloudflareIPV4FileName string = "cloudflare_ipv4.txt" CloudflareDomainFileName string = "cloudflare_domains.txt" ShellSocketName string = "neobox_shell.sock" HistoryFileName string = ".neobox_history" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudflareConf ¶ added in v1.0.0
type CloudflareConf struct {
WireGuardConfDir string `json,koanf:"wireguard_conf_dir"`
CloudflareIPV4URL string `json,koanf:"cloudflare_ipv4_url"`
PortList []int `json,koanf:"port_list"`
MaxGoroutines int `json,koanf:"max_goroutines"`
MaxRTT int64 `json,koanf:"max_rtt"`
MaxPingCount int `json,koanf:"max_ping_count"`
MaxLossRate float32 `json,koanf:"max_loss_rate"`
MaxSaveToDB int `json,koanf:"max_saved"`
CloudflareDomainFileUrl string `json,koanf:"cloudflare_domain_url"`
}
type NeoConf ¶ added in v1.0.0
type NeoConf struct {
WorkDir string `json,koanf:"neobox_work_dir"`
LogDir string `json,koanf:"neobox_log_dir"`
SocketDir string `json,koanf:"socket_dir"`
GeoInfoDir string `json,koanf:"geo_info_dir"`
DatabaseDir string `json,koanf:"database_dir"`
DownloadUrl string `json,koanf:"download_url"`
MaxPingers int `json,koanf:"max_pingers"`
MaxPingAvgRTT int64 `json,koanf:"max_ping_avgrtt"`
MaxPingPackLoss float64 `json,koanf:"max_ping_packloss"`
InboundPort int `json,koanf:"inbound_port"`
EnableInboundSocks bool `json,koanf:"enable_socks"`
VerificationPortRange *PortRange `json,koanf:"port_range"`
VerificationTimeout int `json,koanf:"verification_timeout"`
VerificationUrl string `json,koanf:"verification_url"`
VerificationCron string `json,koanf:"verification_cron"`
MaxToSaveRTT int64 `json,koanf:"max_tosave_rtt"`
CountryAbbrevsUrl string `json,koanf:"country_abbr_url"`
IPLocationQueryUrl string `json,koanf:"ip_location_url"`
IPLocationQueryUrl2 string `json,koanf:"ip_location_url2"`
GeoInfoUrls map[string]string `json,koanf:"geo_info_urls"`
GeoInfoSumUrl string `json,koanf:"geo_info_sum_url"`
KeeperCron string `json,koanf:"keeper_cron"`
CloudflareConf *CloudflareConf `json,koanf:"cloudflare_conf"`
HistoryMaxLines int `json,koanf:"history_max_lines"`
HistoryFileName string `json,koanf:"history_file_name"`
ShellSocketName string `json,koanf:"shell_socket_name"`
EnableVerifier bool `json,koanf:"enable_verifier"`
// contains filtered or unexported fields
}
func GetDefaultNeoConf ¶ added in v1.0.0
func GetDefaultNeoConf() (n *NeoConf)
func NewNeoConf ¶ added in v1.5.0
func (*NeoConf) GetConfPath ¶ added in v1.5.0
func (*NeoConf) SetDefault ¶ added in v1.5.0
func (that *NeoConf) SetDefault()
type RawListEncryptKey ¶ added in v0.0.9
type RawListEncryptKey struct {
Key string `json,koanf:"key"`
// contains filtered or unexported fields
}
Encrypt key
func NewEncryptKey ¶ added in v0.0.9
func NewEncryptKey(dirPath string) (rk *RawListEncryptKey)
func (*RawListEncryptKey) Get ¶ added in v0.0.9
func (that *RawListEncryptKey) Get() string
func (*RawListEncryptKey) Load ¶ added in v0.0.9
func (that *RawListEncryptKey) Load()
func (*RawListEncryptKey) Save ¶ added in v0.0.9
func (that *RawListEncryptKey) Save()
func (*RawListEncryptKey) Set ¶ added in v0.0.9
func (that *RawListEncryptKey) Set(key string)
Click to show internal directories.
Click to hide internal directories.