mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
Migration: go 1.12
This commit is contained in:
parent
815e80f720
commit
d75f9ff783
@ -1,7 +1,7 @@
|
||||
language: go
|
||||
sudo: false
|
||||
go:
|
||||
- "1.11"
|
||||
- '1.12'
|
||||
install:
|
||||
- "go mod download"
|
||||
env:
|
||||
|
@ -36,7 +36,7 @@ go get -u -v github.com/Dreamacro/clash
|
||||
|
||||
Pre-built binaries are available: [release](https://github.com/Dreamacro/clash/releases)
|
||||
|
||||
Requires Go >= 1.11.
|
||||
Requires Go >= 1.12.
|
||||
|
||||
## Daemon
|
||||
|
||||
|
@ -101,8 +101,6 @@ func NewHttp(option HttpOption) *Http {
|
||||
tlsConfig = &tls.Config{
|
||||
InsecureSkipVerify: option.SkipCertVerify,
|
||||
ClientSessionCache: getClientSessionCache(),
|
||||
MinVersion: tls.VersionTLS11,
|
||||
MaxVersion: tls.VersionTLS12,
|
||||
ServerName: option.Server,
|
||||
}
|
||||
}
|
||||
|
@ -118,8 +118,6 @@ func NewSocks5(option Socks5Option) *Socks5 {
|
||||
tlsConfig = &tls.Config{
|
||||
InsecureSkipVerify: option.SkipCertVerify,
|
||||
ClientSessionCache: getClientSessionCache(),
|
||||
MinVersion: tls.VersionTLS11,
|
||||
MaxVersion: tls.VersionTLS12,
|
||||
ServerName: option.Server,
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package constant
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/user"
|
||||
P "path"
|
||||
)
|
||||
|
||||
@ -16,17 +15,11 @@ type path struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
currentUser, err := user.Current()
|
||||
var homedir string
|
||||
homedir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
dir := os.Getenv("HOME")
|
||||
if dir == "" {
|
||||
dir, _ = os.Getwd()
|
||||
}
|
||||
homedir = dir
|
||||
} else {
|
||||
homedir = currentUser.HomeDir
|
||||
homedir, _ = os.Getwd()
|
||||
}
|
||||
|
||||
homedir = P.Join(homedir, ".config", Name)
|
||||
Path = &path{homedir: homedir}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user