Documentation ¶
Index ¶
- Constants
- Variables
- func Ca() error
- func Certsetup() (serverTLSConf *tls.Config, clientTLSConf *tls.Config, err error)
- func CheckCloseByReadOneByte(c net.Conn, err error, readLen int, debug bool) (bool, []byte, int)
- func CheckISOCode(keyword string) string
- func CopyConn(src net.Conn, dst net.Conn, debug bool, limit func() bool, upTraffic func(int)) (allwritten int)
- func CopyConnNoLimit() bool
- func CreateHTTPClient() *http.Client
- func CreateSSH_KEY()
- func CreateUUID() string
- func Crontab(t time.Duration, f func(), fname string)
- func GenerateRsaKey(usePKCS8 bool) ([]byte, []byte)
- func GetISOCodeFromCn(cn string) string
- func GetLocalIp() net.IP
- func GetMacAddrs() (macAddrs []string)
- func GetMacAddrsString() (macAddrs string)
- func HandleRecover()
- func InSlice[...](ary []T, sub T) bool
- func IsNotSupportAddr(addr string) bool
- func IsNotSupportEmail(b []byte) bool
- func IsWhileList(url string) bool
- func Keys(validFor time.Duration) (cert, key *bytes.Buffer, fingerprint [32]byte, err error)
- func Md5(str string) string
- func Md5b(str []byte) string
- func Rand(num int64) *big.Int
- func RandStr(n int) string
- func RandStr2(length int) string
- func Rsa()
- func RunUntilReturnTrue(a func(b string, c string) bool, arg1 string, arg2 string)
- func SendMessage(text string)
- func SliceFilter[T any](ary []T, filter func(v T) bool) []T
- func VerifyEmailFormat(email string) bool
- type CertManager
- type Chacha20Stream
- func (s *Chacha20Stream) Close() error
- func (s *Chacha20Stream) LocalAddr() net.Addr
- func (s *Chacha20Stream) Read(p []byte) (int, error)
- func (s *Chacha20Stream) RemoteAddr() net.Addr
- func (s *Chacha20Stream) SetDeadline(t time.Time) error
- func (s *Chacha20Stream) SetReadDeadline(t time.Time) error
- func (s *Chacha20Stream) SetWriteDeadline(t time.Time) error
- func (s *Chacha20Stream) Write(p []byte) (int, error)
- type DinToke
- type DingMsg
- type LimitSpeed
- type NoneLimitSpeed
- type Robot
- func (robot *Robot) SendLinkMessage(title string, text string, messageUrl string, picUrl string) error
- func (robot *Robot) SendMarkdownMessage(title string, text string, atMobiles []string, isAtAll bool) error
- func (robot *Robot) SendMessage(msg interface{}) error
- func (robot *Robot) SendTextMessage(content string, atMobiles []string, isAtAll bool) error
- type SendMessageManager
Constants ¶
View Source
const ( MessageSystemAlipayPayToken = iota MessageSystemAutoPayToken MessageUserToken )
Variables ¶
View Source
var WL_am = []string{
"51.am",
"126.am",
}
View Source
var WL_biz = []string{
"7daysinn.biz",
"baozhuang.biz",
"bengfa.biz",
"changan.biz",
"chinafastener.biz",
"chongchuang.biz",
"dahuoji.biz",
"diandongche.biz",
"diaoding.biz",
"fishings.biz",
"hanjie.biz",
"intil.biz",
"kuangchan.biz",
"menchuang.biz",
"qianyan.biz",
"rohlan.biz",
"runhuayou.biz",
"shiyongjun.biz",
"shoutao.biz",
"tongye.biz",
"yuanyi.biz",
"zhaoming.biz",
}
View Source
var WL_cc = []string{}/* 151 elements not displayed */
View Source
var WL_cm = []string{
"4.cm",
"60.cm",
"bearing.cm",
"hebei.cm",
"yinshua.cm",
}
View Source
var WL_co = []string{
"425300.co",
"banzhu.co",
"hongfeng.co",
"huas.co",
"lixin.co",
"xiaomayi.co",
"xiapu.co",
"ychdzx.co",
}
View Source
var WL_com = []string{}/* 8072 elements not displayed */
View Source
var WL_de = []string{
"china-botschaft.de",
}
View Source
var WL_edu = []string{
"snai.edu",
"sxrtvu.edu",
}
View Source
var WL_fm = []string{
"douban.fm",
"jing.fm",
"lvxing.fm",
}
View Source
var WL_fr = []string{
"amb-chine.fr",
}
View Source
var WL_hk = []string{
"95599.hk",
"ctrip.com.hk",
"hkidc.hk",
"takungpao.com.hk",
"xsren.hk",
}
View Source
var WL_im = []string{
"cli.im",
"iapps.im",
"iyy.im",
"yixin.im",
}
View Source
var WL_info = []string{
"gmold.info",
"iyaya.info",
"lztech.info",
"meihua.info",
"williamlong.info",
}
View Source
var WL_jobs = []string{
"cn.jobs",
}
View Source
var WL_jp = []string{
"china-embassy.or.jp",
}
View Source
var WL_kr = []string{
"ctrip.co.kr",
}
View Source
var WL_la = []string{
"33.la",
"36.la",
"51.la",
"55.la",
"900.la",
"chaxun.la",
"iz.la",
"qzone.la",
"ulinix.la",
}
View Source
var WL_me = []string{
"21me.me",
"bole.me",
"dzj.me",
"kyhs.me",
"nanxi.me",
"shijue.me",
"tvb.me",
"wmpic.me",
"yuksel.me",
}
View Source
var WL_mobi = []string{
"i1515.mobi",
}
View Source
var WL_net = []string{}/* 925 elements not displayed */
View Source
var WL_org = []string{}/* 282 elements not displayed */
View Source
var WL_sg = []string{
"iedu.sg",
}
View Source
var WL_sh = []string{
"sge.sh",
}
View Source
var WL_so = []string{
"haorenyuan.so",
"lietou.so",
"luyi.so",
"shengqian.so",
"soutudi.so",
"wangxiao.so",
}
View Source
var WL_tm = []string{
"stone.tm",
}
View Source
var WL_tv = []string{
"1819.tv",
"1866.tv",
"1988.tv",
"2588.tv",
"3456.tv",
"5588.tv",
"5666.tv",
"5888.tv",
"5999.tv",
"7999.tv",
"9555.tv",
"9928.tv",
"9998.tv",
"19888.tv",
"005.tv",
"0438.tv",
"0916.tv",
"acg.tv",
"bilibili.tv",
"caoxian.tv",
"cnnl.tv",
"cnsb.tv",
"dengzhou.tv",
"dydh.tv",
"dztv.tv",
"efang.tv",
"gamehome.tv",
"hao315.tv",
"hntv.tv",
"hoolo.tv",
"huaihai.tv",
"imgo.tv",
"jiyou.tv",
"jnnews.tv",
"liaozhai.tv",
"ocar.tv",
"pengzhou.tv",
"pps.tv",
"qbj.tv",
"shiqian.tv",
"wasu.tv",
"weihai.tv",
"zhenping.tv",
"zohi.tv",
}
View Source
var WL_tw = []string{
"hexun.com.tw",
"taiwandao.tw",
}
View Source
var WL_us = []string{
"pangu.us",
}
View Source
var WL_ws = []string{
"0798.ws",
}
View Source
var WhiteList = make(map[string][]string)
Functions ¶
func Certsetup ¶
https://tech.my-netsol.com/?p=179 关于mac的证书标准要求
func CheckCloseByReadOneByte ¶
func CopyConn ¶
func CopyConn(src net.Conn, dst net.Conn, debug bool, limit func() bool, upTraffic func(int)) (allwritten int)
net conn copy from src to dst and process close conn
func CopyConnNoLimit ¶
func CopyConnNoLimit() bool
func CreateHTTPClient ¶
func CreateSSH_KEY ¶
func CreateSSH_KEY()
func CreateUUID ¶
func CreateUUID() string
func GetISOCodeFromCn ¶
func GetLocalIp ¶
func GetMacAddrs ¶
func GetMacAddrs() (macAddrs []string)
func GetMacAddrsString ¶
func GetMacAddrsString() (macAddrs string)
func HandleRecover ¶
func HandleRecover()
func IsNotSupportAddr ¶
不支持Proxy访问的网站 https://www.91yunbbs.com/discussion/comment/1376/
func IsNotSupportEmail ¶
func Keys ¶
Keys generates a new P256 ECDSA public private key pair for TLS. It returns a bytes buffer for the PEM encoded private key and certificate.
func RunUntilReturnTrue ¶
func SliceFilter ¶
func VerifyEmailFormat ¶
Types ¶
type CertManager ¶
type CertManager struct { }
type Chacha20Stream ¶
func NewChacha20Stream ¶
func (*Chacha20Stream) Close ¶
func (s *Chacha20Stream) Close() error
func (*Chacha20Stream) LocalAddr ¶
func (s *Chacha20Stream) LocalAddr() net.Addr
func (*Chacha20Stream) RemoteAddr ¶
func (s *Chacha20Stream) RemoteAddr() net.Addr
func (*Chacha20Stream) SetDeadline ¶
func (s *Chacha20Stream) SetDeadline(t time.Time) error
func (*Chacha20Stream) SetReadDeadline ¶
func (s *Chacha20Stream) SetReadDeadline(t time.Time) error
func (*Chacha20Stream) SetWriteDeadline ¶
func (s *Chacha20Stream) SetWriteDeadline(t time.Time) error
type LimitSpeed ¶
type NoneLimitSpeed ¶
type NoneLimitSpeed struct { }
func (NoneLimitSpeed) Islimit ¶
func (NoneLimitSpeed) Islimit(name string) bool
type Robot ¶
type Robot struct {
// contains filtered or unexported fields
}
func (*Robot) SendLinkMessage ¶
func (*Robot) SendMarkdownMessage ¶
func (*Robot) SendMessage ¶
type SendMessageManager ¶
type SendMessageManager struct { SystemAutoPayToken []DinToke //余额自动支付 SystemAlipayPayToken []DinToke UserToken []DinToke }
var SendMessageManagerG SendMessageManager
func (*SendMessageManager) AddUserToken ¶
func (smm *SendMessageManager) AddUserToken(sec string, msgurl string)
添加用户token
func (*SendMessageManager) SendMessage ¶
func (smm *SendMessageManager) SendMessage(text string, msgtype uint)
Click to show internal directories.
Click to hide internal directories.