summaryrefslogtreecommitdiff
path: root/src/or/proto_socks.c
AgeCommit message (Collapse)Author
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-03-28Allow IPv6 address strings to be used as hostnames in SOCKS5 requestsrl1987
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-10-02Fix our "not an HTTP Proxy" message in light of HTTPTunnelPortNick Mathewson
When we added HTTPTunnelPort, the answer that we give when you try to use your SOCKSPort as an HTTP proxy became wrong. Now we explain that Tor sorta _is_ an HTTP proxy, but a SOCKSPort isn't. I have left the status line the same, in case anything is depending on it. I have removed the extra padding for Internet Explorer, since the message is well over 512 bytes without it. Fixes bug 23678; bugfix on 0.3.2.1-alpha.
2017-09-27Add unit tests for SOCKS functions that parse server responsesNick Mathewson
We use these when we're acting as a SOCKS client, but we'd never actually written tests for them :/
2017-09-27Mark some tests in parse_socks.c as unreachable (BUG, LCOV)Nick Mathewson
These tests aren't reachable, given their actual arguments. I'm going to mark them as BUG(), and as unreachable with LCOV.
2017-09-05Repair buffer API so everything starts with buf_.Nick Mathewson
Our convention is that functions which manipulate a type T should be named T_foo. But the buffer functions were super old, and followed all kinds of conventions. Now they're uniform. Here's the perl I used to do this: \#!/usr/bin/perl -w -i -p s/read_to_buf\(/buf_read_from_socket\(/; s/flush_buf\(/buf_flush_to_socket\(/; s/read_to_buf_tls\(/buf_read_from_tls\(/; s/flush_buf_tls\(/buf_flush_to_tls\(/; s/write_to_buf\(/buf_add\(/; s/write_to_buf_compress\(/buf_add_compress\(/; s/move_buf_to_buf\(/buf_move_to_buf\(/; s/peek_from_buf\(/buf_peek\(/; s/fetch_from_buf\(/buf_get_bytes\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/buf_remove_from_front\(/buf_drain\(/; s/peek_buf_startswith\(/buf_peek_startswith\(/; s/assert_buf_ok\(/buf_assert_ok\(/;
2017-09-05Make buffers.c independent of or.hNick Mathewson
Also, put ext_or function in new module; it had accidentally gotten into proto_socks.c
2017-09-05Make buf_pullup() expose the pulled-up data.Nick Mathewson
This lets us drop the testing-only function buf_get_first_chunk_data(), and lets us implement proto_http and proto_socks without looking at buf_t internals.
2017-09-05Replace buf->datalen usage in proto_*.c with buf_datalen() call.Nick Mathewson
This lets us remove BUFFERS_PRIVATE from two of the modules.
2017-09-05Move protocol-specific functions out of buffers.cNick Mathewson
This commit does not change the implementation of any function: it only moves code and adds new includes as necessary. Part of #23149.