- Notifications
You must be signed in to change notification settings - Fork1.1k
fix: track JetBrains connections#10968
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
c9a226f feat: implement jetbrains agentssh tracking
Emyrk2447970 Add unit test to confirm tracking
Emyrk76d3a24 implement unit test to verify jetbrains functionality
Emyrkadf2fb3 Implement port process inspection
code-asherad034f2 Add JetBrains tracking to bottom bar
code-asher34b7c5e Elaborate on process name check comment
code-asherdce56fd Comment that localForwardChannelData is copied
code-asher7139448 Comment ChannelAccepterWatcher
code-asher6e8f235 Rename channel watcher to be specific to Jetbrains
code-asher4d65478 Log unmarshal failure
code-asher254a5b6 Add constant for JetBrains magic string
code-ashera75ed6c Fix JetBrains tracking test
code-asherFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PrevPrevious commit
Fix JetBrains tracking test
The test name only shows up in the process name if you are running thattest directly so we have to spawn a separate process instead.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commita75ed6c26930375588837dbefcc4d27e3eddf423
There are no files selected for viewing
51 changes: 31 additions & 20 deletionsagent/agent_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletionsscripts/echoserver/main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package main | ||
| // A simple echo server. It listens on a random port, prints that port, then | ||
| // echos back anything sent to it. | ||
| import ( | ||
| "errors" | ||
| "fmt" | ||
| "io" | ||
| "log" | ||
| "net" | ||
| ) | ||
| func main() { | ||
| l, err := net.Listen("tcp", "127.0.0.1:0") | ||
| if err != nil { | ||
| log.Fatalf("listen error: err=%s", err) | ||
| } | ||
| defer l.Close() | ||
| tcpAddr, valid := l.Addr().(*net.TCPAddr) | ||
| if !valid { | ||
| log.Fatal("address is not valid") | ||
| } | ||
| remotePort := tcpAddr.Port | ||
| _, err = fmt.Println(remotePort) | ||
| if err != nil { | ||
| log.Fatalf("print error: err=%s", err) | ||
| } | ||
| for { | ||
| conn, err := l.Accept() | ||
| if err != nil { | ||
| log.Fatalf("accept error, err=%s", err) | ||
| return | ||
| } | ||
| go func() { | ||
| defer conn.Close() | ||
| _, err := io.Copy(conn, conn) | ||
| if errors.Is(err, io.EOF) { | ||
| return | ||
| } else if err != nil { | ||
| log.Fatalf("copy error, err=%s", err) | ||
| } | ||
| }() | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.