重新组织目录结构
This commit is contained in:
parent
fc214b2c72
commit
54cd925ab2
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
llog "github.com/TransX/log"
|
||||
"github.com/TransX/protocol"
|
||||
"github.com/davecheney/profile"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
|
@ -15,12 +16,12 @@ var mux sync.Mutex
|
|||
var benchSeed int
|
||||
|
||||
func transClient() {
|
||||
t := NewTransTCP()
|
||||
t := protocol.NewTransTCP()
|
||||
t.Start("1200", "127.0.0.1", "1201", "client")
|
||||
}
|
||||
|
||||
func transServer() {
|
||||
t := NewTransTCP()
|
||||
t := protocol.NewTransTCP()
|
||||
t.Start("1201", "192.168.56.101", "80", "server")
|
||||
}
|
||||
|
||||
|
|
|
|||
5
main.go
5
main.go
|
|
@ -6,12 +6,13 @@ import (
|
|||
"fmt"
|
||||
"github.com/TransX/cli"
|
||||
"github.com/TransX/log"
|
||||
"github.com/TransX/protocol"
|
||||
"github.com/davecheney/profile"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func tunnel() {
|
||||
trans := NewTransTCP()
|
||||
trans := protocol.NewTransTCP()
|
||||
log.Info("%s side is encrypted.", cli.EncryptSide)
|
||||
if cli.DestPort != 0 {
|
||||
log.Info("Listening on 0.0.0.0:%d. Forward %s:%d", cli.ListenPort, cli.DestIP, cli.DestPort)
|
||||
|
|
@ -22,7 +23,7 @@ func tunnel() {
|
|||
|
||||
}
|
||||
|
||||
func main() {
|
||||
func main1() {
|
||||
defer profile.Start(profile.CPUProfile).Stop()
|
||||
flag.Parse()
|
||||
fmt.Println("Hello World!")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package protocol
|
||||
|
||||
type Direction int
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package main
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
Loading…
Reference in New Issue