Skip to content

Commit

Permalink
pf listen only log ince
Browse files Browse the repository at this point in the history
  • Loading branch information
rkonfj committed Apr 25, 2023
1 parent 15dbb69 commit 2912da8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/pf/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (t *TunnelManager) Run() {
t.wg.Add(len(t.forwards))

for _, f := range t.forwards {
logrus.Infof("listen on %s for %s://%s now", f.local, f.network, f.remote)
go t.forward(f)
}
t.wg.Wait()
Expand All @@ -77,7 +78,6 @@ func (t *TunnelManager) forward(mp mapping) {
logrus.Error("[tcp] ", err)
return
}
logrus.Infof("listen on %s for %s://%s now", mp.local, mp.network, mp.remote)
for {
conn, err := listener.Accept()
if err != nil {
Expand Down Expand Up @@ -125,7 +125,6 @@ func (t *TunnelManager) forward(mp mapping) {
rConn, err := t.client.DialUDP(context.Background(), mp.remote)
if err == nil {
mp.bo.Reset()
logrus.Infof("listen on %s for %s://%s now", mp.local, mp.network, mp.remote)
pipeUDP(conn, rConn)
}
if err != nil {
Expand Down

0 comments on commit 2912da8

Please sign in to comment.