1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

Merge branch 'agioi-master'

This commit is contained in:
Kslr 2020-06-27 07:52:02 +08:00
commit 2b25988129
No known key found for this signature in database
GPG Key ID: 0AF5F66FA1E887CE
8 changed files with 7 additions and 19 deletions

View File

@ -16,10 +16,6 @@ import (
)
func Test_parseResponse(t *testing.T) {
type args struct {
payload []byte
}
var p [][]byte
ans := new(dns.Msg)

View File

@ -308,7 +308,7 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err
}
// skip domain without any dot
if strings.Index(domain, ".") == -1 {
if !strings.Contains(domain, ".") {
return nil, newError("invalid domain name").AtWarning()
}

View File

@ -294,10 +294,7 @@ func NewAttributeMatcher(code string) (*AttributeMatcher, error) {
return nil, newError("attr rule").Base(err)
}
p, err := starlark.FileProgram(starFile, func(name string) bool {
if name == "attrs" {
return true
}
return false
return name == "attrs"
})
if err != nil {
return nil, err

View File

@ -126,8 +126,6 @@ type VMessOutboundConfig struct {
Receivers []*VMessOutboundTarget `json:"vnext"`
}
var bUser = "a06fe789-5ab1-480b-8124-ae4599801ff3"
// Build implements Buildable
func (c *VMessOutboundConfig) Build() (proto.Message, error) {
config := new(outbound.Config)

View File

@ -28,9 +28,9 @@ var (
test = flag.Bool("test", false, "Test config file only, without launching V2Ray server.")
format = flag.String("format", "json", "Format of input file.")
/* We have to do this here because Golang's Test will also need to parse flag, before
main func in this file is run.
*/
/* We have to do this here because Golang's Test will also need to parse flag, before
* main func in this file is run.
*/
_ = func() error {
flag.Var(&configFiles, "config", "Config file for V2Ray. Multiple assign is accepted (only json). Latter ones overrides the former ones.")
@ -166,7 +166,7 @@ func main() {
{
osSignals := make(chan os.Signal, 1)
signal.Notify(osSignals, os.Interrupt, os.Kill, syscall.SIGTERM)
signal.Notify(osSignals, os.Interrupt, syscall.SIGTERM)
<-osSignals
}
}

View File

@ -50,7 +50,6 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ
return nil, nil, newError("failed to initialize decoding stream").Base(err).AtError()
}
br := &buf.BufferedReader{Reader: r}
reader = nil
authenticator := NewAuthenticator(HeaderKeyGenerator(account.Key, iv))
request := &protocol.RequestHeader{

View File

@ -159,8 +159,7 @@ func (v *TimedUserValidator) Get(userHash []byte) (*protocol.MemoryUser, protoco
copy(fixedSizeHash[:], userHash)
pair, found := v.userHash[fixedSizeHash]
if found {
var user protocol.MemoryUser
user = pair.user.user
user := pair.user.user
if atomic.LoadUint32(pair.taintedFuse) == 0 {
return &user, protocol.Timestamp(pair.timeInc) + v.baseTime, true, nil
}

View File

@ -9,7 +9,6 @@ import (
type Server struct {
Port net.Port
PathHandler map[string]http.HandlerFunc
accepting bool
server *http.Server
}