Commit Graph

124 Commits

Author SHA1 Message Date
Matt Joiner 5a2c1c9b76 Upgrade to simplified logger 2019-08-21 20:44:12 +10:00
Matt Joiner 9224303c1e Update all imports of dht to v2 2019-08-10 18:46:07 +10:00
Matt Joiner 018de2c96c Improve comments on some config fields 2019-07-23 11:30:05 +10:00
Matt Joiner 958ff01eab Change the default client port 2019-07-19 16:19:21 +10:00
Matt Joiner 1d8873552a Rework header obfuscation and add tests for fallbacks 2019-07-19 13:23:36 +10:00
BruceWang 60e215aa81 Add OnQuery Hook 2019-05-29 15:08:46 +10:00
Matt Joiner b5a1aabe90 Make the default conntracker instance unlimited for now
There are rate limiting issues in the DHT that need to be resolved.
2019-04-09 12:54:41 +10:00
Matt Joiner 3ba91c4334 Bump protocol strings 2018-11-21 17:06:31 +11:00
Matt Joiner f4e30656d6 Add initial connection tracking 2018-11-21 17:02:22 +11:00
Matt Joiner fc4fab91f5 Switch to goimports import sorting
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00
Denis Kuzmenok 9dc89ab6dc reverting usage of proxy for http requests 2018-10-31 10:54:10 +11:00
Matt Joiner ad0c33a50c Fix TLS handshake failures with https trackers
Fixes #276
2018-10-18 11:09:56 +11:00
Matt Joiner d493604adc Add comments to some ClientConfig fields 2018-09-03 11:48:11 +10:00
Matt Joiner 4db3870836 Reduce default handshake timeout to 3s 2018-07-15 13:01:22 +10:00
Matt Joiner de08380464 Decide where to set proxy for HTTP trackers
Remove old ClientConfig.setProxyURL, set this directly now through ClientConfig.TrackerHttpClient.Transport.Proxy (if your Client allows it).
2018-07-11 15:10:58 +10:00
Matt Joiner e3cb94006c Reinstate the reduce dial timeout and update some values
Fixes #263
2018-07-10 11:19:14 +10:00
Matt Joiner fad06c7ddf sortimports 2018-07-07 11:36:58 +10:00
Matt Joiner e0f0617b0b Comments and readability 2018-07-07 11:33:48 +10:00
Matt Joiner 0caafd8e87 Allow dropping connections to the same peer ID
Necessary for a test that expects one connection to each other Client.
2018-06-16 16:40:37 +10:00
Matt Joiner 70dfc1f518 Allow disabling accept limiting and modify some constants 2018-06-16 16:37:13 +10:00
Matt Joiner e97f487d2e Rename Config->ClientConfig and change how defaults work
This is a very breaking change.
2018-06-16 16:30:04 +10:00
Denis f6ed514c3b added proxy support to the library, using ProxyURL parameter. (#256) 2018-06-08 20:52:36 +10:00
Matt Joiner e9386d1016 Fix #246 2018-04-12 23:34:31 +10:00
Matt Joiner b5df073217 Support different hosts for each network
CircleCI's localhost hostname doesn't resolve for IPv6.
2018-04-12 15:06:53 +10:00
Matt Joiner 319e57d1c6 Rework conns to/and allow multiple DHT servers
This will help with #229, and IPv6 support.
2018-04-12 11:41:07 +10:00
Matt Joiner d950677f67 Expose public IPv4 and IPv6 config options and use them with trackers 2018-03-29 14:29:15 +11:00
Matt Joiner aab77ab05d Adjust some config defaults 2018-02-16 12:15:56 +11:00
Matt Joiner b92e8b7814 Add support for disabling IPv4 and IPv4 peers 2018-02-16 10:46:11 +11:00
Matt Joiner eb0f9ff813 Raise default torrent peers highwater to 500 2018-02-08 23:52:54 +11:00
Matt Joiner 51b3374015 Add very tentative UPnP NAT traversal
Relates to #230
2018-01-25 13:14:20 +11:00
Matt Joiner 89ea4c0e29 Fix mentions of TorrentDataOpener 2018-01-11 17:11:54 +11:00
Matt Joiner 554b8e3e0c Improve comments on Config.{Upload,Download}RateLimiter
See #225
2018-01-07 20:31:10 +11:00
Denis Kuzmenok 455a414204 adding http user-agent setters and usage 2017-12-28 10:47:51 +02:00
Matt Joiner 4190856b6c sortimports 2017-12-01 18:12:29 +11:00
Matt Joiner 8f7720edb2 Merge commit '6ab65a49a8a72dea1a28968b2ab42a85fd4566ec'
# Conflicts:
#	config.go
2017-11-08 20:23:15 +11:00
Matt Joiner 2f8a2ada2e Config.Debug isn't just for logging 2017-11-08 19:29:01 +11:00
themihai 6ab65a49a8 feat(config): Allows the torrent client to customise the client identity and connection config 2017-11-07 20:14:13 +02:00
Samuel 3e74396c66 Aggressive Upload (#203)
* Aggressive Upload Config

* Aggressive Upload

* Flip config option.

* Flip Aggressive Upload Config Option
2017-11-05 14:04:33 +11:00
Matt Joiner dd1bc6b837 Improve comment on Config.UploadRateLimiter 2017-11-04 17:07:18 +11:00
Matt Joiner 881f1a7e35 Support plaintext crypto method for protocol header encryption 2017-09-13 18:20:20 +10:00
Matt Joiner 78a8db10da sortimports 2017-03-19 17:04:32 +11:00
Matt Joiner b68d7cd08e dht/… moved to github.com/anacrolix/dht 2016-12-14 11:43:37 +11:00
Matt Joiner d4cbdc5c38 Add download rate limiting
Fixes #121.
2016-10-10 17:29:39 +11:00
Matt Joiner 099fb9546e Fix Config.UploadRateLimiter comment 2016-10-10 15:03:02 +11:00
Matt Joiner 836bb344f3 Add really simple upload rate limiting and test 2016-10-10 14:58:29 +11:00
Matt Joiner 76c24e70b5 Improve code comments 2016-10-10 14:57:34 +11:00
Matt Joiner 9126db177b Add Config.{Force,PreferNo}Encryption 2016-09-16 12:42:41 +10:00
Matt Joiner 69f4c5a7e9 Minor comments and test improvement 2016-09-16 12:13:06 +10:00
Matt Joiner 1e919dd6b1 Rework storage interfaces to make them simpler to implement
This allows lots of behaviour to be baked into the new Client, Torrent and Piece wrappers, rather than duplicating (badly) them in all the backend implementations.
2016-09-02 15:10:57 +10:00
Matt Joiner 02ea8b1081 Rename storage.I->Client 2016-05-16 21:50:43 +10:00
Matt Joiner b5812bb0b7 Remove the last of the "config dir" stuff
This just conflates the Client. It should be done orthogonally.
2016-05-05 23:05:28 +10:00
Matt Joiner deea9d2192 Fix Config.IPBlocklist type 2016-04-04 16:23:30 +10:00
Matt Joiner 8f164ae956 Remove some of the magic ConfigDir stuff
This might become a helper. Torrent file cache still remains.
2016-04-04 14:04:48 +10:00
Matt Joiner b97b50aca9 New storage interface 2016-03-28 20:38:30 +11:00
Matt Joiner 73208b97ca Code comments 2016-02-17 17:09:43 +11:00
Matt Joiner 8696f32e58 Make Config.DHTConfig not a pointer 2016-01-17 00:12:53 +11:00
Matt Joiner c7f9bfccc1 Ditch go-flags for tagflag
Fixes #37
2015-11-05 23:21:39 +11:00
Matt Joiner 4472a0e27a Add Debug flag to Config
I'll use this to squash the noisy logging for people who don't care.
2015-08-23 12:59:03 +10:00
Matt Joiner 497d185373 Add an option to disable IPv6 2015-08-05 02:41:50 +10:00
Matt Joiner 51aad774ab Add IPBlocklist option to Config, and test it's inherited by DHT 2015-08-04 01:07:22 +10:00
Matt Joiner 0d13293d71 Support seeding 2015-05-15 08:39:53 +10:00
Matt Joiner 1ba2f18750 Add the --disable-tcp flag to the client options 2015-04-20 17:35:21 +10:00
Matt Joiner b37f6d6f96 Add the option to disable encryption 2015-04-20 17:30:22 +10:00
Matt Joiner 19a50712dc Add the ability to disable PEX
Fixes #3
2015-03-25 15:42:14 +11:00
Matt Joiner 1ec15c9560 cmd/torrent: Replace flag with go-flags, rejig options 2015-03-25 15:41:15 +11:00
Matt Joiner 842a32ae0c Rewrite import paths for migration from Bitbucket 2015-03-20 16:37:44 +11:00
Matt Joiner ad6ac3f2cd More cleaning of public interface 2015-03-08 17:28:14 +11:00
Matt Joiner 0eb418360b Allow configuring Client torrent data opener, config dir, disabling metainfo cache, and prune with a timer instead of goroutine 2015-02-25 14:48:39 +11:00
Matt Joiner c75f79b097 Speed up tests, allow -short for some UDP tracker stuff 2014-12-02 14:23:01 -06:00
Matt Joiner 50e3db173f Allow DHT server config to be passed through when creating a new client 2014-11-28 12:13:08 -06:00
Matt Joiner 8d96195b0c Connect to peers using both UTP and TCP; Share UTP port with DHT 2014-11-16 23:27:01 -06:00
Matt Joiner 77e064a0f5 Allow the client ID to be set in the config 2014-11-16 13:54:43 -06:00
Matt Joiner 78ed2c74d0 Make NoUpload a client configuration option and use it for torrentfs 2014-08-25 06:00:29 +10:00
Matt Joiner 40fd1d647c Tidy up the torrent and DHT APIs 2014-08-21 18:07:06 +10:00