Skip to content

Commit

Permalink
Merge pull request #1258 from ersonp/fix/vpn-server
Browse files Browse the repository at this point in the history
Fix vpn server
  • Loading branch information
mrpalide authored Jun 20, 2022
2 parents afed86e + 52f2ec4 commit bef3b2b
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 34 deletions.
2 changes: 1 addition & 1 deletion cmd/skywire-visor/commands/systray.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package commands
import (
"context"

"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/systray"

"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire/internal/gui"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"github.com/skycoin/dmsg/pkg/dmsg"
"github.com/skycoin/dmsg/pkg/dmsgget"
"github.com/skycoin/dmsg/pkg/dmsghttp"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/systray"
"github.com/toqueteos/webbrowser"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire/pkg/servicedisc"
"github.com/skycoin/skywire/pkg/skyenv"
"github.com/skycoin/skywire/pkg/visor"
Expand Down
3 changes: 1 addition & 2 deletions internal/httpauth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import (
"sync"
"sync/atomic"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/packetfilter/kcp-filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net"
"sync/atomic"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/xtaci/kcp-go"

"github.com/skycoin/skywire-utilities/pkg/logging"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/skysocks/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"testing"
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/nettest"
"golang.org/x/net/proxy"

"github.com/skycoin/skywire-utilities/pkg/logging"
)

func TestMain(m *testing.M) {
Expand Down
12 changes: 4 additions & 8 deletions internal/vpn/os_server_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,16 @@ func GetIPTablesForwardPolicy() (string, error) {
if err != nil {
return "", err
}
if len(outputBytes) == 0 {
return "", errPermissionDenied
}
return strings.TrimRight(string(outputBytes), "\n"), nil
}

// SetIPTablesForwardPolicy sets `policy` for iptables `forward` chain.
func SetIPTablesForwardPolicy(policy string) error {
cmd := fmt.Sprintf(setIPTablesForwardPolicyCMDFmt, policy)
outBytes, err := osutil.RunWithResult("sh", "-c", cmd)
if err != nil {
return err
}
if len(outBytes) == 0 {
return errPermissionDenied
}
return nil
return osutil.Run("sh", "-c", cmd)
}

// SetIPTablesForwardAcceptPolicy sets ACCEPT policy for iptables `forward` chain.
Expand Down
1 change: 0 additions & 1 deletion pkg/app/appserver/proc_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire/pkg/app/appcommon"
"github.com/skycoin/skywire/pkg/app/appdisc"
"github.com/skycoin/skywire/pkg/app/appevent"
Expand Down
1 change: 0 additions & 1 deletion pkg/app/appserver/rpc_ingress_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire/pkg/app/appnet"
"github.com/skycoin/skywire/pkg/app/idmanager"
"github.com/skycoin/skywire/pkg/routing"
Expand Down
1 change: 0 additions & 1 deletion pkg/routefinder/rfclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire/pkg/routing"
)

Expand Down
1 change: 0 additions & 1 deletion pkg/router/rpc_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package router

import (
"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire/pkg/routing"
)

Expand Down
3 changes: 1 addition & 2 deletions pkg/setup/rpc_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (
"net"
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire/pkg/routing"
"github.com/skycoin/skywire/pkg/setup/setupmetrics"
"github.com/skycoin/skywire/pkg/transport/network"
Expand Down
2 changes: 1 addition & 1 deletion pkg/setup/setupclient/mock_route_group_dialer.go

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

3 changes: 1 addition & 2 deletions pkg/transport/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"io"
"net/http"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/httputil"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire/pkg/transport/network"
)

Expand Down
3 changes: 1 addition & 2 deletions pkg/transport/managed_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"sync/atomic"
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/httputil"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire-utilities/pkg/netutil"
"github.com/skycoin/skywire/pkg/app/appevent"
"github.com/skycoin/skywire/pkg/routing"
Expand Down
3 changes: 1 addition & 2 deletions pkg/utclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import (
"net/http"
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire-utilities/pkg/netutil"
"github.com/skycoin/skywire/internal/httpauth"
)
Expand Down
3 changes: 1 addition & 2 deletions pkg/visor/visorconfig/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (
"errors"
"io/ioutil"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
"github.com/skycoin/skywire/pkg/skyenv"
)

Expand Down
3 changes: 1 addition & 2 deletions pkg/visor/visorconfig/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import (
"strings"
"time"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire-utilities/pkg/cipher"
"github.com/skycoin/skywire-utilities/pkg/logging"
)

// Fetch fetches the service URLs & ip:ports from the config service endpoint
Expand Down
1 change: 0 additions & 1 deletion scripts/mac_installer/desktop-deinstaller/deinstaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"syscall"

"github.com/skycoin/skywire-utilities/pkg/logging"

"github.com/skycoin/skywire/pkg/util/osutil"
)

Expand Down

0 comments on commit bef3b2b

Please sign in to comment.