infra

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TLSObject = `{
 		 "serverName": "{{address}}",
 		 "allowInsecure": {{allowInsecure}},
 		 "alpn": ["http/1.1"]
		}`

	WsObject = `{
 		 "path": "{{path}}",
 		 "headers": {
  		  "Host": "{{host}}"
 		 }
		}`

	KcpObject = `` /* 255-byte string literal not displayed */

	HttpObject = `{
		"host": [{{host}}],
		"path": "{{path}}"
		}`
	QuicObject = `{
		  "security": "{{host}}",
		  "key": "{{path}}",
		  "header": {
		    "type": "{{type}}"
		  }
		}`
)
View Source
const ChinaSites = `
{
	"type": "field",
	"outboundTag": "direct",
    "domain": ["geosite:cn"] 
},`
View Source
const ConfigTpl = `` /* 1453-byte string literal not displayed */
View Source
const DefaultV2GenConf = `` /* 1301-byte string literal not displayed */

Variables

This section is empty.

Functions

func GenV2RayConf

func GenV2RayConf(conf V2genConfig, template ...[]byte) ([]byte, error)

Types

type V2genConfig

type V2genConfig map[string]string

func DefaultConf

func DefaultConf() V2genConfig

func ParseV2genConf

func ParseV2genConf(b []byte) V2genConfig

ParseV2genConf parses the file into a [string]string map

func (*V2genConfig) Append

func (config *V2genConfig) Append(conf map[string]string) *V2genConfig

func (*V2genConfig) Config

func (config *V2genConfig) Config() map[string]string

Jump to

Keyboard shortcuts

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