Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access log add detour tag #1725

Closed
wants to merge 1 commit into from
Closed

access log add detour tag #1725

wants to merge 1 commit into from

Conversation

fcying
Copy link
Contributor

@fcying fcying commented Jun 6, 2019

for #1639

建了个全局的 chan AccessMessageChan
替换原先的 log.Record(&log.AccessMessage, 改成把AccessMessage放到chan里, 在routedDispatch里面加上detourTag后打印.

有几个位置没替换:
1> error 的打印
2> udp连接 的打印(看代码udp 连接后面没跑routedDispatch? 不是很确定 就没修改)
3>mux/server.go 里面的打印(不知道这个是做什么的, 不确定会不会跑routedDispatch)

效果

2019/06/06 14:55:52 tcp:127.0.0.1:4187 accepted tcp:www.google.com:443 [proxy]
2019/06/06 14:55:54 tcp:127.0.0.1:4190 accepted tcp:www.baidu.com:443 [direct]
2019/06/06 14:55:55 tcp:127.0.0.1:4195 rejected    v2ray.com/core/proxy/socks: failed to read request > read tcp 127.0.0.1:1080->127.0.0.1:4195: wsarecv: An established connection was aborted by the software in your host machine.

@kslr
Copy link
Contributor

kslr commented Jun 12, 2019

hi @fcying

你方便把pr在 https://github.com/v2fly/v2ray-core 重新发起吗,在那边我们可以跑一些自动测试

@fcying
Copy link
Contributor Author

fcying commented Jun 12, 2019

换新仓库了? 是要删了旧的fork, 然后重新fork 新的吗? 直接发起pr 看着有挺多冲突的

@fcying
Copy link
Contributor Author

fcying commented Jun 12, 2019

重新fork 提交上去了. 另外. 我用新仓库编译失败@_@ 新仓库的提交没测试过, 只是合了下.....这个是什么错误?

~/go/src/v2ray.com/core ‹master›$ bazel clean && bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH //release:v2ray_windows_amd64_package --sandbox_debug --verbose_
failures
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
INFO: Analyzed target //release:v2ray_windows_amd64_package (6 packages loaded, 34 targets configured).
INFO: Found 1 target...
ERROR: /home/fcying/go/src/v2ray.com/core/main/BUILD:8:1: error executing shell command: '/bin/bash -c cd ${SPWD} && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 GO111MODULE=on GOCACHE=${TMPDIR}/gocache go build -o bazel-out/k8-fastbuild/bin/main/windows/amd64/wv2ray.exe -compiler gc -gcflag...' failed (Exit 1) process-wrapper failed: error executing command 
  (cd /home/fcying/.cache/bazel/_bazel_fcying/7136ce1c935a3e9be5ab3116c42490ed/sandbox/processwrapper-sandbox/1/execroot/v2ray_core && \
  exec env - \
    GOPATH=/home/fcying/go \
    PATH=/home/fcying/bin:/home/fcying/.local/bin:/home/fcying/tool/go/bin:/home/fcying/qt/5.12.1/gcc_64/bin:/home/fcying/go/bin:/home/fcying/.cargo/bin:/snap/bin:/home/fcying/.yarn/bin:/home/fcying/.config/yarn/global/node_modules/.bin:/home/fcying/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/fcying/.fzf/bin \
    TMPDIR=/tmp \
  /home/fcying/.cache/bazel/_bazel_fcying/install/d3bd40b000554ec2dfd10da1797a94e5/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'cd ${SPWD} && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 GO111MODULE=on GOCACHE=${TMPDIR}/gocache go build -o bazel-out/k8-fastbuild/bin/main/windows/amd64/wv2ray.exe -compiler gc -gcflags "all=-trimpath=${GOPATH}/src" -asmflags "all=-trimpath=${GOPATH}/src" -ldflags '\''-s -w -H windowsgui'\'' -tags '\'''\'' v2ray.com/core/main'): process-wrapper failed: error executing command 
  (cd /home/fcying/.cache/bazel/_bazel_fcying/7136ce1c935a3e9be5ab3116c42490ed/sandbox/processwrapper-sandbox/1/execroot/v2ray_core && \
  exec env - \
    GOPATH=/home/fcying/go \
    PATH=/home/fcying/bin:/home/fcying/.local/bin:/home/fcying/tool/go/bin:/home/fcying/qt/5.12.1/gcc_64/bin:/home/fcying/go/bin:/home/fcying/.cargo/bin:/snap/bin:/home/fcying/.yarn/bin:/home/fcying/.config/yarn/global/node_modules/.bin:/home/fcying/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/fcying/.fzf/bin \
    TMPDIR=/tmp \
  /home/fcying/.cache/bazel/_bazel_fcying/install/d3bd40b000554ec2dfd10da1797a94e5/_embedded_binaries/process-wrapper '--timeout=0' '--kill_delay=15' /bin/bash -c 'cd ${SPWD} && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 GO111MODULE=on GOCACHE=${TMPDIR}/gocache go build -o bazel-out/k8-fastbuild/bin/main/windows/amd64/wv2ray.exe -compiler gc -gcflags "all=-trimpath=${GOPATH}/src" -asmflags "all=-trimpath=${GOPATH}/src" -ldflags '\''-s -w -H windowsgui'\'' -tags '\'''\'' v2ray.com/core/main')
/bin/bash: line 0: cd: HOME not set
Target //release:v2ray_windows_amd64_package failed to build
INFO: Elapsed time: 0.243s, Critical Path: 0.03s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

@kslr
Copy link
Contributor

kslr commented Jun 12, 2019

/bin/bash: line 0: cd: HOME not set

你到开发群这边来 https://t.me/joinchat/JiDjBFceHgtzk2gxXRnyRg

@fcying fcying closed this Jun 12, 2019
xiocode pushed a commit to going/v2ray-core that referenced this pull request May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants