aboutsummaryrefslogtreecommitdiff
path: root/src/or/transports.c
Commit message (Collapse)AuthorAge
...
* Make some transports.c functions static.George Kadianakis2012-07-03
| | | | - Also reorder functions.
* Refactor mp->transports to use transport_t.George Kadianakis2012-07-03
|
* Introduce a transport_t deep copy function.George Kadianakis2012-07-03
|
* Move transport-related functions from circuitbuild.c to transports.c.George Kadianakis2012-07-03
| | | | | Move 'transport_t' to transports.h, and all transport-related functions that don't rely on 'bridge_list' to transports.c.
* Don't do DNS lookups when parsing corrupted managed proxy messages.George Kadianakis2012-06-25
| | | | | | The functions parse_{s,c}method_line() were using tor_addr_port_lookup() which is capable of doing DNS lookups. DNS lookups should not be necessary when parsing {C,S}METHOD lines.
* Improve log message issued when a managed proxy fails to launch.George Kadianakis2012-06-23
|
* Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson2012-06-15
|
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Ignore unknown lines from managed proxies.George Kadianakis2012-05-18
|
* Fix a couple of wide linesNick Mathewson2012-05-11
|
* Merge remote-tracking branch 'asn/bug4865_take2'Nick Mathewson2012-05-11
|\
| * Fix issues found by nickm.George Kadianakis2012-04-12
| | | | | | | | | | | | | | | | | | | | * Document fmt_addr_impl() and friends. * Parenthesize macro arguments. * Rename get_first_listener_addrport_for_pt() to get_first_listener_addrport_string(). * Handle port_cfg_t with no_listen. * Handle failure of router_get_active_listener_port_by_type(). * Add an XXX to router_get_active_listener_port_by_type().
| * Pass OR address to PT proxy, even with IPv6 or ORListenAddress.George Kadianakis2012-03-31
| | | | | | | | | | | | Introduce get_first_listener_addrport_for_pt() which returns a string containing the addrport of the first listener we could find. Use it to form the TOR_PT_ORPORT managed proxy protocol line.
* | Using %d to printf an enum may not be by-the-standard okay.Nick Mathewson2012-05-07
| |
* | Fix an overwide lineNick Mathewson2012-05-07
| |
* | Document some transports.c behaviors and assumptionsNick Mathewson2012-05-07
| |
* | Make transports.c logs a bit more helpful.George Kadianakis2012-05-03
|/
* Merge branch 'bug5105-v2-squashed'Nick Mathewson2012-02-17
|\ | | | | | | | | Conflicts: src/or/transports.c
| * Heap-allocate strings returned by get_current_process_environment_variablesRobert Ransom2012-02-17
| |
| * Pass process_environment_t * to tor_spawn_backgroundRobert Ransom2012-02-17
| | | | | | | | Now tor_spawn_background's prototype is OS-independent.
| * Rewrite managed proxy environment setup codeRobert Ransom2012-02-17
| | | | | | | | | | Now, the environment setup is entirely OS-independent, as well as less hacky and brittle.
* | Downgrade "Registered server transport" msg to notice. Bug 5136Nick Mathewson2012-02-15
| |
* | Use _NSGetEnviron() instead of environ where requiredSebastian Hahn2012-02-14
|/ | | | | OS X would otherwise crash with a segfault when linked statically to some libraries.
* Reinstate TOR_PR_EXTENDED_SERVER_PORT, just a littleNick Mathewson2012-02-13
|
* set_managed_proxy_environment() can't fail anymoreSebastian Hahn2012-02-12
| | | | | It already couldn't fail on Windows, now it can't fail on non-Windows, either.
* Properly set up environment for managed-mode obfsproxySebastian Hahn2012-02-12
|
* Try to have (and maintain!) an invariant about unconfigured_proxies_nNick Mathewson2012-02-12
| | | | | | | | | | | | | | | The invariant is: unconfigured_proxies_n is exactly the number of managed_proxy_t not in state PT_PROTO_COMPLETED. To maintain this, we need to stop overloading unconfigured_proxies_n to also count managed_proxy_t items that are in PT_PROTO_COMPLETED but which might need relaunching. To make it so we can detect those, we introduce another variable. This commit also adds a function to assert that we haven't broken the invariant. Fix for bug 5084; bugfix on 0.2.3.6-alpha, I think.
* Don't smartlist_remove a managed proxy from a list we're iterating over.Nick Mathewson2012-02-12
| | | | | | | | | In some cases, we solve this by doing a SMARTLIST_DEL_CURRENT before calling managed_proxy_destroy. But for a trickier one, we just make a copy of the list before iterating over it, so that changes to the manage proxy list don't hurt our iteration. This could be related to bug 5084.
* Fix #5097 on Windows, tooRobert Ransom2012-02-12
|
* Fix bug #5097: remove bogus envvar from managed proxies' environmentRobert Ransom2012-02-12
|
* Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* Merge remote-tracking branch 'asn-mytor/bug4751'Nick Mathewson2012-01-16
|\
| * Improve names of some pluggable transport-related functions.George Kadianakis2012-01-13
| |
* | Try to use smartlist_add_asprintf consistentlyNick Mathewson2012-01-16
|/ | | | | | | (To ensure correctness, in every case, make sure that the temporary variable is deleted, renamed, or lowered in scope, so we can't have any bugs related to accidentally relying on the no-longer-filled variable.)
* Merge remote-tracking branch 'asn-mytor/bug4725_take2'Nick Mathewson2011-12-20
|\
| * Server transports should be instructed to bind on INADDR_ANY by default.George Kadianakis2011-12-18
| |
* | Doxygenize the file-level documentation of transports.c.George Kadianakis2011-12-16
|/
* Fix warnings.Linus Nordberg2011-12-01
| | | | | | Remove environ declaration. Use ORPort->value. And it's a string. Make tmp a char *.
* Initial hacking for proposal 186.Nick Mathewson2011-11-30
| | | | | | | | | | | | | | This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
* Make the pt/transports test not crash.Nick Mathewson2011-11-25
|
* Make process_handle_t private and fix some unit testsNick Mathewson2011-11-25
| | | | | | | | Let's *not* expose more cross-platform-compatibility structures, or expect code to use them right. Also, don't fclose() stdout_handle and stdin_handle until we do tor_process_handle_destroy, or we risk a double-fclose.
* Merge remote-tracking branch 'asn/bug3472_act2'Nick Mathewson2011-11-25
|\
| * Tell the bridge operator on what ports his transports spawned.George Kadianakis2011-11-02
| | | | | | | | | | | | - Add a LOG_WARN message when registering the transports of a server managed proxy, so that the bridge operator can see in what ports the transports spawned and notify his/her clients.
| * Rename tor_process_destroy() to tor_process_handle_destroy().George Kadianakis2011-10-24
| |
| * Improve general code quality.George Kadianakis2011-10-24
| | | | | | | | | | | | | | | | - Add a tor_process_get_pid() function that returns the PID of a process_handle_t. - Conform to make check-spaces. - Add some more documentation. - Improve some log messages.
| * Add PT_PROTO_FAILED_LAUNCH managed proxy state.George Kadianakis2011-10-24
| | | | | | | | | | | | We used to try to terminate the managed proxy process even if it failed while launching. We introduce a new managed proxy state, to represent a *broken* and *not launched* proxy.
| * Make set_managed_proxy_environment() work on Windows.George Kadianakis2011-10-24
| |
| * Port managed proxy launching code to the new subprocess API.George Kadianakis2011-10-17
| |
* | Fix names of functions that convert strings to addrsNick Mathewson2011-10-11
|/ | | | | | | | | | | | | | | | | | | | Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed.