Created
October 22, 2013 08:54
-
-
Save DrayChou/7097359 to your computer and use it in GitHub Desktop.
修改的代码文件为 config.go main.go, 新添加文件 ssh2.go
新增的配置格式为:
# plink 代理参数
sshServer2 = user@server:password:local_socks_port[:server_ssh_port]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d:/golang/go-win-386/bin/go.exe build [D:/golang/code/cow] | |
成功: 进程退出代码 0. | |
D:/golang/code/cow/cow.exe [D:/golang/code/cow] | |
panic: runtime error: invalid memory address or nil pointer dereference | |
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x4d5118] | |
goroutine 1 [running]: | |
runtime.panic(0x5860a0, 0x7b984f) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/runtime/panic.c:266 +0xa6 | |
log.(*Logger).Output(0x0, 0x2, 0x125029c0, 0x25, 0x0, ...) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/log/log.go:134 +0x388 | |
log.(*Logger).Println(0x0, 0x1c25bc, 0x1, 0x1) | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/log/log.go:169 +0x5e | |
main.errorLogging.Println(0x54f501, 0x1c25bc, 0x1, 0x1) | |
D:/golang/code/cow/log.go:105 +0x4b | |
main.upgradeConfig(0x12500438, 0x6, 0x12514c00, 0x80, 0x80) | |
D:/golang/code/cow/config.go:602 +0x471 | |
main.parseConfig(0x12500438, 0x6, 0x1250a100) | |
D:/golang/code/cow/config.go:557 +0xc18 | |
main.main() | |
D:/golang/code/cow/main.go:42 +0x5f | |
goroutine 3 [syscall]: | |
os/signal.loop() | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/os/signal/signal_unix.go:21 +0x20 | |
created by os/signal.init·1 | |
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist284472239/go/src/pkg/os/signal/signal_unix.go:27 +0x33 | |
错误: 进程退出代码 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
谢谢 @cyfdecyf
确实,这样就可以编译通过了。也可以正常执行了。
但是,还有个问题,plink 不能直接进行代理,在联通的那个时候需要输入Y同意授权,不知道你有没有办法。