mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-05 04:47:37 +03:00
Add naive inbound and test
This commit is contained in:
parent
ccdfab378a
commit
b79b19c470
23 changed files with 709 additions and 87 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing/common/debug"
|
||||
F "github.com/sagernet/sing/common/format"
|
||||
"github.com/sagernet/sing/common/rw"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
|
@ -71,7 +72,9 @@ func startDockerContainer(t *testing.T, options DockerOptions) {
|
|||
if len(options.Bind) > 0 {
|
||||
hostOptions.Binds = []string{}
|
||||
for path, internalPath := range options.Bind {
|
||||
path = filepath.Join("config", path)
|
||||
if !rw.FileExists(path) {
|
||||
path = filepath.Join("config", path)
|
||||
}
|
||||
path, _ = filepath.Abs(path)
|
||||
hostOptions.Binds = append(hostOptions.Binds, path+":"+internalPath)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue