Skip to content

Commit

Permalink
Merge branch 'master' of github.com:/v2fly/v2ray-core
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholascw committed Jun 1, 2020
2 parents 82ae56e + a1e4c9b commit c84e795
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 109 deletions.
7 changes: 4 additions & 3 deletions app/dispatcher/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport.
return
}

accessMessage := log.AccessMessageFromContext(ctx)
if accessMessage != nil {
accessMessage.Detour = "[" + handler.Tag() + "]"
if accessMessage := log.AccessMessageFromContext(ctx); accessMessage != nil {
if tag := handler.Tag(); tag != "" {
accessMessage.Detour = tag
}
log.Record(accessMessage)
}

Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- checkout: self
- task: GoTool@0
inputs:
version: '1.14'
version: '1.13'
- script: |
go test -p 1 -v -timeout 30m ./...
workingDirectory: '$(Build.SourcesDirectory)'
Expand Down
7 changes: 1 addition & 6 deletions common/buf/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ func NewReader(reader io.Reader) Reader {
if err != nil {
newError("failed to get sysconn").Base(err).WriteToLog()
} else {
/* Check if ReadVReader Can be used on this reader first
Fix https://github.com/v2ray/v2ray-core/issues/1666
*/
if ok, _ := checkReadVConstraint(rawConn); ok {
return NewReadVReader(reader, rawConn)
}
return NewReadVReader(reader, rawConn)
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions common/buf/readv_constraint_other.go

This file was deleted.

41 changes: 0 additions & 41 deletions common/buf/readv_constraint_windows.go

This file was deleted.

10 changes: 7 additions & 3 deletions common/log/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ type AccessMessage struct {
To interface{}
Status AccessStatus
Reason interface{}
Detour interface{}
Email string
Detour string
}

func (m *AccessMessage) String() string {
Expand All @@ -36,8 +37,11 @@ func (m *AccessMessage) String() string {
builder.WriteByte(' ')
builder.WriteString(serial.ToString(m.To))
builder.WriteByte(' ')
builder.WriteString(serial.ToString(m.Detour))
builder.WriteByte(' ')
if len(m.Detour) > 0 {
builder.WriteByte('[')
builder.WriteString(m.Detour)
builder.WriteString("] ")
}
builder.WriteString(serial.ToString(m.Reason))

if len(m.Email) > 0 {
Expand Down
3 changes: 1 addition & 2 deletions infra/conf/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package command
//go:generate errorgen

import (
"bufio"
"os"

"github.com/golang/protobuf/proto"
Expand All @@ -28,7 +27,7 @@ func (c *ConfigCommand) Description() control.Description {
}

func (c *ConfigCommand) Execute(args []string) error {
pbConfig, err := serial.LoadJSONConfig(bufio.NewReader(os.Stdin))
pbConfig, err := serial.LoadJSONConfig(os.Stdin)
if err != nil {
return newError("failed to parse json config").Base(err)
}
Expand Down
2 changes: 1 addition & 1 deletion release/install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ main(){
RETVAL="$?"
if [[ $RETVAL == 0 ]] && [[ "$FORCE" != "1" ]]; then
colorEcho ${BLUE} "Latest version ${CUR_VER} is already installed."
if [[ "${ERROR_IF_UPTODATE}" == "1" ]]; then
if [ -n "${ERROR_IF_UPTODATE}" ]; then
return 10
fi
return
Expand Down
10 changes: 1 addition & 9 deletions release/user-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ packtgzAbPath() {
echo ">>> Generated: $ABPATH"
}

packtgzAbPath() {
local ABPATH="$1"
echo ">>> Generating tgz package at $ABPATH"
pushd $TMP
tar cvfz $ABPATH .
echo ">>> Generated: $ABPATH"
}


pkg=zip
nosource=0
Expand Down Expand Up @@ -169,7 +161,7 @@ if [[ $pkg == "zip" ]]; then
elif [[ $pkg == "tgz" ]]; then
packtgz
else
packtgzAbPath $pkg
packtgzAbPath "$pkg"
fi


Expand Down
20 changes: 2 additions & 18 deletions transport/internet/tls/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,24 +187,8 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
}

if !c.AllowInsecureCiphers && len(config.CipherSuites) == 0 {
config.CipherSuites = []uint16{
tls.TLS_AES_128_GCM_SHA256,
tls.TLS_AES_256_GCM_SHA384,
tls.TLS_CHACHA20_POLY1305_SHA256,

tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
}
// crypto/tls will use the proper ciphers
config.CipherSuites = nil
}

config.InsecureSkipVerify = c.AllowInsecure
Expand Down
16 changes: 0 additions & 16 deletions transport/internet/tls/tls13_workaround.go

This file was deleted.

0 comments on commit c84e795

Please sign in to comment.