Skip to content

Commit

Permalink
refactor:工程命令改为tproxy2socks
Browse files Browse the repository at this point in the history
  • Loading branch information
0990 committed Mar 19, 2023
1 parent 0eb51ea commit 939cb9b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ipt2socks
# tproxy2socks
将iptables(TPROXY)透明代理流量转换为socks5流量的golang版工具,类似工具有[zfl9/ipt2socks](https://github.com/zfl9/ipt2socks)

## 特性
* 支持转成sock4流量
* 支持转成sock4,socks4a流量
* 支持转成socks5(tcp&udp)流量

## 使用
```
ipt2socks --listen=0.0.0.0:60080 --proxy=socks5://127.0.0.1:1080
tproxy2socks --listen=0.0.0.0:60080 --proxy=socks5://127.0.0.1:1080
```

### 参数
Expand Down
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"flag"
"fmt"
"github.com/0990/ipt2socks"
"github.com/0990/tproxy2socks"
"github.com/sirupsen/logrus"
"os"
"os/signal"
Expand All @@ -23,7 +23,7 @@ func main() {
logrus.SetLevel(logrus.WarnLevel)
}

server, err := ipt2socks.NewServer(ipt2socks.Config{
server, err := tproxy2socks.NewServer(tproxy2socks.Config{
Proxy: *proxy,
ListenAddr: *listen,
UDPTimeout: int32(*udpTimeout),
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ipt2socks
package tproxy2socks

type Config struct {
Proxy string
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/0990/ipt2socks
module github.com/0990/tproxy2socks

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion proxy_dialer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ipt2socks
package tproxy2socks

import (
"errors"
Expand Down
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ipt2socks
package tproxy2socks

import (
"fmt"
"github.com/0990/ipt2socks/tproxy"
"github.com/0990/tproxy2socks/tproxy"
"github.com/sirupsen/logrus"
"net"
"sync"
Expand Down
6 changes: 3 additions & 3 deletions udp.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ipt2socks
package tproxy2socks

import (
"fmt"
"github.com/0990/ipt2socks/syncx"
"github.com/0990/ipt2socks/tproxy"
"github.com/0990/tproxy2socks/syncx"
"github.com/0990/tproxy2socks/tproxy"
"github.com/sirupsen/logrus"
"net"
"syscall"
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ipt2socks
package tproxy2socks

import "net"

Expand Down

0 comments on commit 939cb9b

Please sign in to comment.