Skip to content

Commit

Permalink
Merge branch 'develop' into fix/add-include-versions-flag-to-log-coll…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
mrpalide authored Nov 3, 2023
2 parents 46bd9d2 + b6cad4e commit bd7790d
Show file tree
Hide file tree
Showing 1,413 changed files with 452,853 additions and 158,268 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
Expand All @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
shell: pwsh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
Expand All @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- uses: actions/checkout@v3
- name: Install Requirements
run: |
Expand Down
19 changes: 16 additions & 3 deletions cmd/apps/skychat/skychat.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
port = routing.Port(1)
)

var addr = flag.String("addr", ":8001", "address to bind")
var addr = flag.String("addr", ":8001", "address to bind, put an * before the port if you want to be able to access outside localhost")
var r = netutil.NewRetrier(nil, 50*time.Millisecond, netutil.DefaultMaxBackoff, 5, 2)

var (
Expand Down Expand Up @@ -84,7 +84,20 @@ func main() {
http.HandleFunc("/message", messageHandler(ctx))
http.HandleFunc("/sse", sseHandler)

fmt.Println("Serving HTTP on", *addr)
url := ""
address := *addr
if len(address) < 5 || (address[:1] != ":" && address[:2] != "*:") {
url = "127.0.0.1:8001"
} else if address[:1] == ":" {
url = "127.0.0.1" + address
} else if address[:2] == "*:" {
url = address[1:]
} else {
url = "127.0.0.1:8001"
}

fmt.Println("Serving HTTP on", url)

if runtime.GOOS != "windows" {
termCh := make(chan os.Signal, 1)
signal.Notify(termCh, os.Interrupt)
Expand All @@ -97,7 +110,7 @@ func main() {
}
setAppStatus(appCl, appserver.AppDetailedStatusRunning)
srv := &http.Server{ //nolint gosec
Addr: *addr,
Addr: url,
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/skywire-cli/commands/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var RootCmd = &cobra.Command{
Short: "Generate completion script",
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1)),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
Expand Down
578 changes: 537 additions & 41 deletions cmd/skywire-cli/commands/config/gen.go

Large diffs are not rendered by default.

138 changes: 71 additions & 67 deletions cmd/skywire-cli/commands/config/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,73 +21,77 @@ var (
Test: visorconfig.DmsgHTTPServersData{DMSGServers: []*disc.Entry{}},
Prod: visorconfig.DmsgHTTPServersData{DMSGServers: []*disc.Entry{}},
}
noFetch bool
noDefaults bool
stcprPort int
sudphPort int
sk cipher.SecKey
output string
confPath string
configName string //nolint Note: configName used, but golangci-lint marked it unused in wrong
isStdout bool
isRegen bool
isRetainHypervisors bool
isTestEnv bool
pText string
isPkgEnv bool
isUsrEnv bool
isHypervisor bool
hypervisorPKs string
dmsgptyWlPKs string
surveyWhitelistPKs string
routeSetupNodes string
transportSetupPKs string
isDmsgHTTP bool
isVpnServerEnable bool
isDisableAuth bool
isEnableAuth bool
selectedOS string
disableApps string
isBestProtocol bool
serviceConfURL string
services *visorconfig.Services
isForce bool
isHide bool
isAll bool
isOutUnset bool
ver string
isRoot = visorconfig.IsRoot()
svcConf = strings.ReplaceAll(utilenv.ServiceConfAddr, "http://", "") //visorconfig.DefaultServiceConfAddr
testConf = strings.ReplaceAll(utilenv.TestServiceConfAddr, "http://", "") //visorconfig.DefaultServiceConfAddr
gHiddenFlags []string
uHiddenFlags []string
binPath string
logLevel string
isPkg bool
input string
isUpdateEndpoints bool
addHypervisorPKs string
isResetHypervisor bool
setVPNClientKillswitch string
addVPNClientSrv string
addVPNClientPasscode string
isResetVPNclient bool
addVPNServerPasscode string
setVPNServerSecure string
setVPNServerAutostart string
setVPNServerNetIfc string
isResetVPNServer bool
addSkysocksClientSrv string
isResetSkysocksClient bool
skysocksPasscode string
isResetSkysocks bool
setPublicAutoconnect string
minHops int
isUsr bool
isPublic bool
disablePublicAutoConn bool
isDisplayNodeIP bool
addExampleApps bool
noFetch bool
noDefaults bool
stcprPort int
sudphPort int
sk cipher.SecKey
output string
confPath string
configName string //nolint Note: configName used, but golangci-lint marked it unused in wrong
isStdout bool
isRegen bool
isRetainHypervisors bool
isTestEnv bool
pText string
isPkgEnv bool
isUsrEnv bool
isHypervisor bool
hypervisorPKs string
dmsgptyWlPKs string
surveyWhitelistPKs string
routeSetupNodes string
transportSetupPKs string
isDmsgHTTP bool
isVpnServerEnable bool
isDisableAuth bool
isEnableAuth bool
selectedOS string
disableApps string
isBestProtocol bool
serviceConfURL string
services visorconfig.Services
isForce bool
isHide bool
isAll bool
isOutUnset bool
ver string
isRoot = visorconfig.IsRoot()
svcConf = strings.ReplaceAll(utilenv.ServiceConfAddr, "http://", "") //visorconfig.DefaultServiceConfAddr
testConf = strings.ReplaceAll(utilenv.TestServiceConfAddr, "http://", "") //visorconfig.DefaultServiceConfAddr
gHiddenFlags []string
uHiddenFlags []string
binPath string
logLevel string
isPkg bool
input string
isUpdateEndpoints bool
addHypervisorPKs string
isResetHypervisor bool
setVPNClientKillswitch string
addVPNClientSrv string
addVPNClientPasscode string
isResetVPNclient bool
addVPNServerPasscode string
setVPNServerSecure string
setVPNServerAutostart string
setVPNServerNetIfc string
isResetVPNServer bool
addSkysocksClientSrv string
isResetSkysocksClient bool
skysocksPasscode string
isResetSkysocks bool
setPublicAutoconnect string
minHops int
isUsr bool
isPublic bool
disablePublicAutoConn bool
isDisplayNodeIP bool
addExampleApps bool
enableProxyClientAutostart bool
disableProxyServerAutostart bool
proxyServerPass string
proxyClientPass string
)

// RootCmd contains commands that interact with the config of local skywire-visor
Expand Down
Loading

0 comments on commit bd7790d

Please sign in to comment.