Improve bind interface

This commit is contained in:
世界
2022-07-14 23:06:03 +08:00
parent b9086b31e6
commit e13b72afca
8 changed files with 75 additions and 25 deletions

View File

@@ -17,9 +17,9 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/sagernet/sing-box/log"
)
// kanged from clash
@@ -75,7 +75,7 @@ func init() {
continue
}
logrus.Info("pulling image: ", image)
log.Info("pulling image: ", image)
imageStream, err := dockerClient.ImagePull(context.Background(), image, types.ImagePullOptions{})
if err != nil {
panic(err)

View File

@@ -5,7 +5,7 @@ go 1.18
require (
github.com/docker/docker v20.10.17+incompatible
github.com/docker/go-connections v0.4.0
github.com/sagernet/sing v0.0.0-20220714121943-f8c0f71a89f5
github.com/sagernet/sing v0.0.0-20220714145306-09b55ce4b6d0
github.com/sagernet/sing-box v0.0.0
github.com/stretchr/testify v1.8.0
golang.org/x/net v0.0.0-20220708220712-1185a9018129
@@ -34,7 +34,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sagernet/sing-dns v0.0.0-20220711062726-c64e938e4619 // indirect
github.com/sagernet/sing-shadowsocks v0.0.0-20220714111527-a6fa7ada6e81 // indirect
github.com/sagernet/sing-tun v0.0.0-20220714105342-455aba7939ae // indirect
github.com/sagernet/sing-tun v0.0.0-20220714151007-c0d248af0361 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/vishvananda/netlink v1.1.0 // indirect
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect

View File

@@ -52,14 +52,14 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sagernet/sing v0.0.0-20220714121943-f8c0f71a89f5 h1:OdcGVZQxCe8xlb4jc5LWrYFu54Tz4IULxLco44qOnN8=
github.com/sagernet/sing v0.0.0-20220714121943-f8c0f71a89f5/go.mod h1:3ZmoGNg/nNJTyHAZFNRSPaXpNIwpDvyIiAUd0KIWV5c=
github.com/sagernet/sing v0.0.0-20220714145306-09b55ce4b6d0 h1:8tnMLN6jdqKkjPXwgEekwloPaAmvbxQAMMHdWYOiMj8=
github.com/sagernet/sing v0.0.0-20220714145306-09b55ce4b6d0/go.mod h1:3ZmoGNg/nNJTyHAZFNRSPaXpNIwpDvyIiAUd0KIWV5c=
github.com/sagernet/sing-dns v0.0.0-20220711062726-c64e938e4619 h1:oHbOmq1WS0XaZmXp6WpxzyB2xeyRIA1/L8EJKuNntfY=
github.com/sagernet/sing-dns v0.0.0-20220711062726-c64e938e4619/go.mod h1:y2fpvoxukw3G7eApIZwkcpcG/NE4AB8pCQI0Qd8rMqk=
github.com/sagernet/sing-shadowsocks v0.0.0-20220714111527-a6fa7ada6e81 h1:VuUk/04yCr3dw2uJj0/OFVeVO5O2dwYGlj/RzuEfYDE=
github.com/sagernet/sing-shadowsocks v0.0.0-20220714111527-a6fa7ada6e81/go.mod h1:MuyT+9fEPjvauAv0fSE0a6Q+l0Tv2ZrAafTkYfnxBFw=
github.com/sagernet/sing-tun v0.0.0-20220714105342-455aba7939ae h1:kTchVdHf8akqVEwuG59JpwGwcUNDQWys8cxP7IVvNbE=
github.com/sagernet/sing-tun v0.0.0-20220714105342-455aba7939ae/go.mod h1:oIK1kg8hkeA5zNSv9BcbTPzdR00bbVBt6eYvJp+rsck=
github.com/sagernet/sing-tun v0.0.0-20220714151007-c0d248af0361 h1:M6m9mXG5u151voF0wSDLf5JoDwHU5+4FOMrzb/kaRdc=
github.com/sagernet/sing-tun v0.0.0-20220714151007-c0d248af0361/go.mod h1:p7QbUBs2ejf6UQsiHyy1xGAWOk9JWQjZTHy8pOmkWmo=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=