Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#3608 closed defect (implemented)

Server transport proxies should bind on a consistent port

Reported by: asn Owned by: asn
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords: tor-bridge
Cc: Actual Points:
Parent ID: #3591 Points:
Reviewer: Sponsor:


Server transport proxies should be instructed to bind on a consistent port.

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by asn

Status: newneeds_review

An implementation of this can be found in my bug3608 branch.

It uses TransportProxy lines in or_state_t to store the ports where server proxies are binding.

The TransportProxy line format is: TransportProxy <method> <addrport>, which is not terribly sophisticated or extensible. Currently, if we find a corrupted TransportProxy line we just warn the user without trashing the current state. A corrupted TransportProxy line should only happen with manual editing of the state file.

comment:2 Changed 8 years ago by nickm

Looks like this is based on "bug3472_prealpha" ; I should remember to review this one after that one.

comment:3 Changed 8 years ago by nickm

state_transport_line_is_valid() takes a char*, but isn't documented to change it. If it doesn't change it, it should take const char *

validate_transports_in_state doesn't do what it's documented to do: It never returns -1

get_transport_in_state_by_name will fail badly if there are two transports A and B such that A's name is a prefix of B's.

You shouldn't need to be messing with this STRUCT_VAR_P stuff and config_find_option stuff if you know the name of the field you want to access -- just use C and say "get_or_state()->TransportProxies"

get_transport_bindaddr should probably check that the line actually starts with the name of the transport and a space.

For save_transport_to_state, would it be simpler to just clear the entire TransportProxies field, and re-add *every* transport?

When in doubt, prefer tor_addr_t

Most of the new functions that take managed_proxy_t * should take const managed_proxy_t *. Many of them can be static

comment:4 Changed 8 years ago by nickm

See #3656; that's where the action on this branch seems to be these days. :/

comment:5 Changed 8 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

merged 3656

comment:6 Changed 7 years ago by nickm

Keywords: tor-bridge added

comment:7 Changed 7 years ago by nickm

Component: Tor BridgeTor
Note: See TracTickets for help on using tickets.