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

Fake Networking TCP Improvements #1247

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Fake Networking TCP Improvements #1247

merged 1 commit into from
Feb 19, 2025

Conversation

basicer
Copy link
Contributor

@basicer basicer commented Feb 8, 2025

  • No need for handle now that we have TCPConnection
  • Add a function to probe if a port is open on the VM without finishing the three way TCP handshake.

- No need for handle now tha we have TCPConnection

- Add a function to probe if a port is open on the VM without
  finishing the three way TCP handshake.
@@ -61,6 +61,11 @@ FetchNetworkAdapter.prototype.connect = function(port)
return fake_tcp_connect(port, this);
};

FetchNetworkAdapter.prototype.tcp_probe = function(port)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what do you use this for?

Copy link
Contributor Author

@basicer basicer Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great question! In alpine.sh I have some tech worked out so that the service worker can receive web requests, and then route them from the browser into an httpd server running in the VM. I like the classic look of it just being a terminal, so it uses this to probe common ports in the background. When it finds one open it adds a split pane with an iframe. You don't want to actually initiate the connections, as that can often confuse servers, so similar to nmap, we dont send SYN ACK so the user-space program never sees the probing connections.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff, looking forward to playing around with that.

@copy copy merged commit 582cfff into copy:master Feb 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants