Skip to content

Commit

Permalink
move dir
Browse files Browse the repository at this point in the history
  • Loading branch information
esrrhs committed Mar 18, 2023
1 parent f8d9ed6 commit 520cdd7
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"github.com/esrrhs/gohome/common"
Expand Down
13 changes: 7 additions & 6 deletions main.go → cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"github.com/esrrhs/gohome/common"
"github.com/esrrhs/gohome/loggo"
"github.com/esrrhs/pingtunnel"
"net"
"net/http"
_ "net/http/pprof"
Expand Down Expand Up @@ -166,8 +167,8 @@ func main() {
*tcpmode = 1
}
}
if *tcpmode_maxwin*10 > FRAME_MAX_ID {
fmt.Println("set tcp win to big, max = " + strconv.Itoa(FRAME_MAX_ID/10))
if *tcpmode_maxwin*10 > pingtunnel.FRAME_MAX_ID {
fmt.Println("set tcp win to big, max = " + strconv.Itoa(pingtunnel.FRAME_MAX_ID/10))
return
}

Expand All @@ -186,7 +187,7 @@ func main() {
loggo.Info("key %d", *key)

if *t == "server" {
s, err := NewServer(*key, *maxconn, *max_process_thread, *max_process_buffer, *conntt)
s, err := pingtunnel.NewServer(*key, *maxconn, *max_process_thread, *max_process_buffer, *conntt)
if err != nil {
loggo.Error("ERROR: %s", err.Error())
return
Expand All @@ -213,7 +214,7 @@ func main() {
}

if len(*s5filter) > 0 {
err := LoadGeoDB(*s5ftfile)
err := pingtunnel.LoadGeoDB(*s5ftfile)
if err != nil {
loggo.Error("Load Sock5 ip file ERROR: %s", err.Error())
return
Expand All @@ -229,7 +230,7 @@ func main() {
return false
}

ret, err := GetCountryIsoCode(taddr.IP.String())
ret, err := pingtunnel.GetCountryIsoCode(taddr.IP.String())
if err != nil {
return false
}
Expand All @@ -239,7 +240,7 @@ func main() {
return ret != *s5filter
}

c, err := NewClient(*listen, *server, *target, *timeout, *key,
c, err := pingtunnel.NewClient(*listen, *server, *target, *timeout, *key,
*tcpmode, *tcpmode_buffersize, *tcpmode_maxwin, *tcpmode_resend_timems, *tcpmode_compress,
*tcpmode_stat, *open_sock5, *maxconn, &filter)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion country.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion country_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/esrrhs/pingtunnul
module github.com/esrrhs/pingtunnel

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion msg.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion msg.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
option go_package = "main";
option go_package = "pingtunnel";

message MyMsg {
enum TYPE {
Expand Down
2 changes: 1 addition & 1 deletion pingtunnel.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"encoding/binary"
Expand Down
2 changes: 1 addition & 1 deletion pingtunnel_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package pingtunnel

import (
"github.com/esrrhs/gohome/common"
Expand Down

0 comments on commit 520cdd7

Please sign in to comment.