mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
When the orport-srcaddr option is set, we bind to a source IP address before dialing the ORPort/ExtORPort. tor similarly binds to a source IP address when OutboundBindAddress is set in torrc. Since tor 0.4.7.13, tor sets IP_BIND_ADDRESS_NO_PORT, and because problems arise when some programs use IP_BIND_ADDRESS_NO_PORT and some do not, we also have to start using IP_BIND_ADDRESS_NO_PORT when we upgrade tor (tpo/anti-censorship/pluggable-transports/snowflake#40270). Related: tpo/anti-censorship/pluggable-transports/snowflake#40198
14 lines
318 B
Go
14 lines
318 B
Go
//go:build !linux
|
|
// +build !linux
|
|
|
|
package main
|
|
|
|
import "syscall"
|
|
|
|
// dialerControl does nothing.
|
|
//
|
|
// On Linux, this function would set the IP_BIND_ADDRESS_NO_PORT socket option
|
|
// in preparation for a future bind-before-connect.
|
|
func dialerControl(network, address string, c syscall.RawConn) error {
|
|
return nil
|
|
}
|