Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Do port detection in cdc_rsync_server and cdc_fuse_fs instead of running netstat/ss #68

Open
@ljusten

Description

@ljusten

Running netstat/ss via ssh to find available ports is slow and not very robust. It would be better to detect ports in C++ code. One problem right now is when cdc_rsync_server is started, the port must be known as port forwarding is set up at the same time.

Instead doing this:

  • Run netstat locally and remotely to find available ports
  • Run an ssh command that sets up port forwarding and executes cdc_rsync_server / cdc_fuse_fs
  • Connect to port

Do this:

  • Run an ssh command that executes cdc_rsync_server / cdc_fuse_fs
  • In cdc_rsync_server / cdc_fuse_fs, detect available ports (in C++ code!), print out "...is listening on port X" and block
  • In cdc_rsync / cdc_stream, read port, find available local port (in C++ code!), set up port forwarding and connect to port

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions