Skip to content

Commit

Permalink
Fix alterid为0导致的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZBrettonYe committed Dec 12, 2020
1 parent a587436 commit 9d53f18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
41 changes: 12 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
# VNet-V2ray

[![Build Status][1]][2] [![codecov.io][3]][4] [![GoDoc][5]][6] [![codebeat][7]][8] [![Downloads][9]][10]

[1]: https://dev.azure.com/v2ray/core/_apis/build/status/v2ray.core "Build Status badge"
[2]: https://dev.azure.com/v2ray/core/_build/latest?definitionId=1 "Azure Build Status"
[3]: https://codecov.io/github/v2ray/v2ray-core/coverage.svg?branch=master "Coverage badge"
[4]: https://codecov.io/github/v2ray/v2ray-core?branch=master "Codecov Status"
[5]: https://godoc.org/v2ray.com/core?status.svg "GoDoc badge"
[6]: https://godoc.org/v2ray.com/core "GoDoc"
[7]: https://codebeat.co/badges/f2354ca8-3e24-463d-a2e3-159af73b2477 "Codebeat badge"
[8]: https://codebeat.co/projects/github-com-v2ray-v2ray-core-master "Codebeat"
[9]: https://img.shields.io/github/downloads/v2ray/v2ray-core/total.svg "All releases badge"
[10]: https://github.com/v2ray/v2ray-core/releases/ "All releases number"

Project V is a set of network tools that help you to build your own computer network. It secures your network connections and thus protects your privacy. See [our website](https://www.v2ray.com/) for more information.

## License

v2ray follow [The MIT License (MIT)](https://raw.githubusercontent.com/v2ray/v2ray-core/master/LICENSE)

## Credits

This repo relies on the following third-party projects:

* In production:
* [gorilla/websocket](https://github.com/gorilla/websocket)
* [gRPC](https://google.golang.org/grpc)
* For testing only:
* [miekg/dns](https://github.com/miekg/dns)
* [h12w/socks](https://github.com/h12w/socks)
# 编译
1. 安装 go语言, bazel
2. 依次运行
```sh
git clone https://github.com/ProxyPanel/VNet-V2ray.git vent-v2ray && cd vent-v2ray
go mod tidy
bazel build --action_env=PATH=$PATH --action_env=SPWD=$PWD --action_env=GOPATH=$(go env GOPATH) --action_env=GOCACHE=$(go env GOCACHE) --spawn_strategy local //release_vnet:v2ray_linux_amd64_package
```
3. 获得 `bazel-bin/release_vnet/v2ray-linux-64.zip`

# License
GNU GENERAL PUBLIC LICENSE
9 changes: 5 additions & 4 deletions app/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package controller
import (
"context"
"fmt"
"github.com/r3labs/diff"
"os"
"runtime"
"strconv"
"time"

"github.com/r3labs/diff"
"v2ray.com/core"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
Expand All @@ -21,6 +22,7 @@ import (
"v2ray.com/core/common/serial"
"v2ray.com/core/common/task"
"v2ray.com/core/common/uuid"
controllerInterface "v2ray.com/core/features/controller"
"v2ray.com/core/features/inbound"
"v2ray.com/core/infra/conf"
"v2ray.com/core/proxy"
Expand All @@ -30,7 +32,6 @@ import (
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/internet/tls"
"v2ray.com/core/transport/internet/websocket"
controllerInterface "v2ray.com/core/features/controller"
)

//go:generate errorgen
Expand Down Expand Up @@ -234,8 +235,7 @@ func (c *Controller) buildInboundConfig(info *api.NodeInfo) (*core.InboundHandle

func (c *Controller) buildOutboundConfig(info *api.NodeInfo) (*core.OutboundHandlerConfig, error) {

sendConfig := &proxyman.SenderConfig{
}
sendConfig := &proxyman.SenderConfig{}

freedomConfig := &freedom.Config{
DomainStrategy: freedom.Config_USE_IP,
Expand Down Expand Up @@ -287,6 +287,7 @@ func (c *Controller) getUserFromRemote() error {
continue
}
account.ID = protocol.NewID(id)
account.AlterIDs = protocol.NewAlterIDs(account.ID, uint16(c.nodeInfo.V2AlterID))
user.Account = account
memoryUserList = append(memoryUserList, user)
log.Record(&log.GeneralMessage{
Expand Down
2 changes: 1 addition & 1 deletion release_vnet/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "v1.6.0",
"latest": "v1.6.1",
"history": [
"v1.6.0",
"v1.5.0",
Expand Down

0 comments on commit 9d53f18

Please sign in to comment.