Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/sky rev fwd #1830

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
70378f3
refactor: Rename `skyrev` and `skyfwd` to `net`
Jun 15, 2024
65a4123
refactor: Rename `forward` to `connect`
Jun 15, 2024
8ee38fa
feat: Add `publish` and update `connect`
Jun 17, 2024
102802f
fix(publish): Remove ReadTimeout
ersonp Jun 22, 2024
47672e0
fix(connect): Add sync.Mutex to handleConnectFunc
ersonp Jun 22, 2024
c5681da
refactor: Remove `RegisterHTTPPort` and `DeregisterHTTPPort` from API…
ersonp Jun 22, 2024
09b1532
chore(visor/api): Fix go-staticcheck warnings
ersonp Jun 22, 2024
a575224
chore: Update .gitignore to ignore skywire-config.json and local dire…
ersonp Jun 22, 2024
5eecb1a
refactor: Convert remaning skyfwd code to `net`
ersonp Jun 22, 2024
27b864e
refactor: Rename and change `ListHTTPPorts` and `ListConnected`
ersonp Jun 22, 2024
2a8cee5
refactor: Update ConnectConn to use http.Server for serving
ersonp Jun 22, 2024
87e6748
chore: Update comment
ersonp Jun 22, 2024
d73b400
refactor: Update `connect` command to print connection details in JSO…
ersonp Jun 22, 2024
dcd7b58
feat: add app type support
ersonp Jun 24, 2024
870c6ee
feat: ensure port availability
ersonp Jun 25, 2024
cbbc403
refactor: update APIs
ersonp Jun 25, 2024
4e69512
refactor: add subcommands to con and pub
ersonp Jun 25, 2024
b9b97c5
fix(publish): remove http.Server headers
ersonp Jun 25, 2024
7205554
chore: fix linting issues
ersonp Jun 26, 2024
b2f97a9
chore: fix linting
ersonp Jun 26, 2024
1daefdd
fix(publish): impliment proper usage of LocalPort
ersonp Jun 26, 2024
02e630c
refactor: Update `connect` and `publish` commands
ersonp Jun 26, 2024
42e44ad
refactor: Update `publish.go` to address Slowloris attack vector
ersonp Jun 26, 2024
18b96db
chore: fix linting
ersonp Jun 26, 2024
3ab96d9
chore: fix linting
ersonp Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: Update connect command to print connection details in JSO…
…N format
  • Loading branch information
ersonp committed Jun 22, 2024
commit d73b4004d4d4a5a0475df0b9ae3cd61fb4f52a38
10 changes: 9 additions & 1 deletion cmd/skywire-cli/commands/net/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ var conCmd = &cobra.Command{
}
id, err := rpcClient.Connect(remotePK, remotePort, localPort)
internal.Catch(cmd.Flags(), err)
internal.PrintOutput(cmd.Flags(), id, fmt.Sprintln(id))

jsonOptout := struct {
ID string `json:"id"`
Addr string `json:"addr"`
}{
ID: id.String(),
Addr: fmt.Sprintf(remotePk + ":" + strconv.Itoa(remotePort)),
}
internal.PrintOutput(cmd.Flags(), jsonOptout, fmt.Sprintf("Connected to %s:%d with ID: %s\n", remotePK, remotePort, id.String()))
},
}
Loading