--address=ADDRESS / --bind-address — bind the server to a specific interface or listen on a specific address
IPv6 literal host support (e.g., [::1]:8080 or user@host:/path with IPv6)
Current FastSync behavior: src/shared/transport_tcp.c and transport_tls.c hardcode AF_INET and struct sockaddr_in. The server binds to INADDR_ANY on IPv4 only. The client uses inet_pton(AF_INET, host, ...) so IPv6 addresses and hostnames are rejected.
Proposed changes:
CLI flags: --bind-address=<ip> (server), --server-host already exists but should accept hostnames and IPv6 literals
Server changes:
Use getaddrinfo() with AI_PASSIVE to support both IPv4 and IPv6
Optionally create separate IPv4/IPv6 sockets or use IPV6_V6ONLY
Bind to the address specified by --bind-address
Client changes:
Use getaddrinfo() in client_connect() and client_connect_tls() to resolve hostnames and IPv6 literals
Parse [::1]:8080 style IPv6 endpoints if added later
Header changes: Server/Client structs should use struct sockaddr_storage
Priority: medium Rationale: IPv6 is increasingly required in modern networks. Hostname resolution is also needed for any real deployment beyond localhost.
Acceptance criteria:
Server can listen on :: and accept IPv6 connections
Client can connect to --server-host ::1
Client can connect to --server-host myserver.example.com
Server --bind-address 127.0.0.1 only accepts IPv4 localhost connections
Existing IPv4 behavior is preserved by default
**Corresponding rsync flags/behavior:**
- `--address=ADDRESS` / `--bind-address` — bind the server to a specific interface or listen on a specific address
- IPv6 literal host support (e.g., `[::1]:8080` or `user@host:/path` with IPv6)
**Current FastSync behavior:**
`src/shared/transport_tcp.c` and `transport_tls.c` hardcode `AF_INET` and `struct sockaddr_in`. The server binds to `INADDR_ANY` on IPv4 only. The client uses `inet_pton(AF_INET, host, ...)` so IPv6 addresses and hostnames are rejected.
**Proposed changes:**
- CLI flags: `--bind-address=<ip>` (server), `--server-host` already exists but should accept hostnames and IPv6 literals
- Server changes:
- Use `getaddrinfo()` with `AI_PASSIVE` to support both IPv4 and IPv6
- Optionally create separate IPv4/IPv6 sockets or use `IPV6_V6ONLY`
- Bind to the address specified by `--bind-address`
- Client changes:
- Use `getaddrinfo()` in `client_connect()` and `client_connect_tls()` to resolve hostnames and IPv6 literals
- Parse `[::1]:8080` style IPv6 endpoints if added later
- Header changes: `Server`/`Client` structs should use `struct sockaddr_storage`
**Priority:** medium
**Rationale:** IPv6 is increasingly required in modern networks. Hostname resolution is also needed for any real deployment beyond localhost.
**Acceptance criteria:**
- [ ] Server can listen on `::` and accept IPv6 connections
- [ ] Client can connect to `--server-host ::1`
- [ ] Client can connect to `--server-host myserver.example.com`
- [ ] Server `--bind-address 127.0.0.1` only accepts IPv4 localhost connections
- [ ] Existing IPv4 behavior is preserved by default
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Corresponding rsync flags/behavior:
--address=ADDRESS/--bind-address— bind the server to a specific interface or listen on a specific address[::1]:8080oruser@host:/pathwith IPv6)Current FastSync behavior:
src/shared/transport_tcp.candtransport_tls.chardcodeAF_INETandstruct sockaddr_in. The server binds toINADDR_ANYon IPv4 only. The client usesinet_pton(AF_INET, host, ...)so IPv6 addresses and hostnames are rejected.Proposed changes:
--bind-address=<ip>(server),--server-hostalready exists but should accept hostnames and IPv6 literalsgetaddrinfo()withAI_PASSIVEto support both IPv4 and IPv6IPV6_V6ONLY--bind-addressgetaddrinfo()inclient_connect()andclient_connect_tls()to resolve hostnames and IPv6 literals[::1]:8080style IPv6 endpoints if added laterServer/Clientstructs should usestruct sockaddr_storagePriority: medium
Rationale: IPv6 is increasingly required in modern networks. Hostname resolution is also needed for any real deployment beyond localhost.
Acceptance criteria:
::and accept IPv6 connections--server-host ::1--server-host myserver.example.com--bind-address 127.0.0.1only accepts IPv4 localhost connections