Miguel Jacq
6f4d7f7f44
Fixes for the edge case where Tor connection dialog is canceled, but the Tor process remains open in the background, which was causing onion.is_authenticated() to True. Remove excessive alerts
2017-12-21 14:08:13 +11:00
Miguel Jacq
b442b5d41b
Ensure we don't consider the Tor connection 'lost' if we're still in the connection dialog process (wait for that thread to finish).
...
Also various implementations of onion.is_authenticated() for a more robust check than onion.connected_to_tor,
which seemed to help some corner cases
2017-12-21 12:15:23 +11:00
Miguel Jacq
bcd4363769
#493 , #500 - detect if the Tor connection (bundled, TorBrowser or otherwise) has been lost while the app is open. Stop a running share if so
2017-12-21 09:22:53 +11:00
Miguel Jacq
890acf9f38
Let the Tor connection take a little longer (60s) if bridges are in use
2017-12-14 17:31:15 +11:00
Miguel Jacq
2a52b1a6ac
Forgot the UseBridges line for custom bridges
2017-12-11 16:20:42 +11:00
Miguel Jacq
4674f7d97b
Add bridge support (obfs4 or user-supplied)
2017-12-11 14:53:13 +11:00
Miguel Jacq
bec03bb10e
only set self.private_key after the Onion service has started, if we received a new one
2017-12-09 08:18:06 +11:00
Miguel Jacq
08c2e106f8
Save the HidServAuth string to settings when private key is also saved. Allow to copy it to clipboard from the SettingsDialog too.
2017-12-09 06:49:34 +11:00
wondratsch
8a905bc04c
add FreeBSD Support
2017-12-07 11:51:32 +01:00
Miguel Jacq
a12f9ed4d8
cleanup the ephemeral hidden service when GUI server is stopped, but don't disconnect from Tor
2017-12-07 16:10:52 +11:00
Miguel Jacq
e7dd78dba7
cleanup the ephemeral hidden service when GUI server is stopped, but don't disconnect from Tor
2017-12-07 16:08:03 +11:00
Miguel Jacq
796a4b3b5d
try and fix tests
2017-12-07 15:33:12 +11:00
Miguel Jacq
3a056803a9
Optionally save the private key of a running share to settings for reuse
2017-12-07 12:45:34 +11:00
Miguel Jacq
0aacfae925
Raise an error if we were unable to obtain a random port
2017-12-07 08:49:10 +11:00
wondratsch
1efe4a6949
fix typo
2017-12-06 12:57:47 +01:00
wondratsch
787877c12b
add OpenBSD Support
2017-12-06 12:47:47 +01:00
Miguel Jacq
eaa37206e5
Let the timer stop the share if there were no downloads, or all downloads are done
2017-12-05 11:18:26 +11:00
Miguel Jacq
91a0c60189
Better fix for preventing timeout firing if a download is not yet done (works for CLI as well as GUI)
2017-12-04 15:03:28 +11:00
Miguel Jacq
2eb7bca242
Merge master branch and fix conflicts
2017-12-03 17:06:33 +11:00
Micah Lee
9910ea5c72
Allow for localization for "Share via OnionShare" string in the nautilus extension
2017-12-01 12:57:18 -08:00
Micah Lee
e7a2b0a277
Merge branch '404_response' of https://github.com/mig5/onionshare into mig5-404_response
2017-11-30 18:01:18 -08:00
Micah Lee
2ab4b68bb7
Merge branch '442_use_looseversion' of https://github.com/mig5/onionshare into mig5-442_use_looseversion
2017-11-30 17:58:25 -08:00
Micah Lee
2da13ba1fa
Merge branch 'fixes' of https://github.com/delirious-lettuce/onionshare into delirious-lettuce-fixes
2017-11-30 17:54:24 -08:00
Micah Lee
d544a0341f
Allow tests to find share folders when building .deb
2017-11-20 16:19:04 -08:00
Miguel Jacq
624028e49f
Format the argparser output better, to deal with the longer argument names
2017-11-12 10:40:04 +11:00
Miguel Jacq
275f345604
better metavar for --shutdown-timeout arg
2017-11-11 17:12:10 +11:00
Miguel Jacq
f220058c63
No longer treating shutdown_timeout as a float, but an int of seconds
2017-11-09 19:50:50 +11:00
Miguel Jacq
877459a560
undo removal of newline in web.py
2017-11-09 18:01:09 +11:00
Miguel Jacq
bb46c2de99
send a HTTP 404 code instead of 200, on 404 pages
2017-11-09 17:51:34 +11:00
Miguel Jacq
481f33c822
use QDateTimeEdit instead of a spinbox for selecting a future date/time to auto-stop share
2017-11-09 11:29:55 +11:00
Miguel Jacq
a4b8a71c68
remove shutdown_timeout logic in the web server, it's not actually needed
2017-11-09 07:12:00 +11:00
Miguel Jacq
32108dcca2
Implements a shutdown timer to stop a share automatically (downloaded or not) after N hours
2017-11-08 20:25:59 +11:00
Miguel Jacq
53faa043f9
use LooseVersion instead of StrictVersion, so that upstream versions of Flask that contain -dev will still work. Fixes #442
2017-11-06 09:16:55 +11:00
Delirious Lettuce
0fb556baf2
Delete temporary tor data directory during cleanup
2017-07-13 18:14:49 -06:00
Delirious Lettuce
18545b7aa2
Reorder imports, spacing, use tempfile.gettempdir
2017-07-10 20:40:01 -06:00
Delirious Lettuce
56109a7012
Reorder imports, use json.load(f)
2017-07-10 20:13:30 -06:00
Delirious Lettuce
301465a49a
Reorder imports, remove p
, use ext
, use json.load(f)
2017-07-10 20:11:04 -06:00
Delirious Lettuce
52d16d21f7
Remove: unused import, round
, formatting indexes. Use tuple
2017-07-10 20:00:19 -06:00
Miguel Jacq
b19f8fce52
Make it possible to supply a custom json settings file from somewhere else
2017-06-01 17:35:27 +10:00
Micah Lee
cd5d95a75d
Merge branch 'hmac_compare_digest' of https://github.com/delirious-lettuce/onionshare into delirious-lettuce-hmac_compare_digest
2017-05-30 14:50:19 -07:00
Micah Lee
da0a2d1930
Merge branch 'format_seconds' of https://github.com/delirious-lettuce/onionshare into delirious-lettuce-format_seconds
2017-05-30 11:44:44 -07:00
Delirious Lettuce
dfd40798fe
Remove constant_time_compare
to use hmac.compare_digest
2017-05-28 13:38:33 -06:00
Delirious Lettuce
5880741c9d
Fix issue mentioned by @mig5
2017-05-26 10:12:11 -06:00
Delirious Lettuce
979242b478
Use divmod
to simplify the calculations, seconds==0 -> '0s'
2017-05-24 22:20:50 -06:00
Delirious Lettuce
d4477ff617
* Use context manager inside of get_available_port
...
* Rearrange imports, one per line
* Reuse original `import random` for `random.SystemRandom` (instead of a separate `from random import SystemRandom`)
* Two blank lines above each function definition
2017-05-24 21:20:07 -06:00
Micah Lee
5c02bbffa3
Merge branch 'build_slug' of https://github.com/delirious-lettuce/onionshare into delirious-lettuce-build_slug
2017-05-24 14:04:06 -07:00
Micah Lee
3e329b1bac
Merge branch 'fix_shutdown_from_gui' of https://github.com/mig5/onionshare into mig5-fix_shutdown_from_gui
2017-05-24 14:00:50 -07:00
Delirious Lettuce
bf7735821c
Removing '\n' arg negates the need for wordlist.remove()
, renamed unused variable 'x' to '_'
2017-05-24 13:22:41 -06:00
Micah Lee
befc253d4b
Fix indenting
2017-05-23 15:16:27 -07:00
Miguel Jacq
36de1951e7
open files via the 'with' statement, to avoid ResourceWarnings on unclosed files
2017-05-23 21:22:14 +10:00
Micah Lee
02216f246b
Merge branch '285_systray_notifications' of https://github.com/mig5/onionshare into mig5-285_systray_notifications
2017-05-22 16:15:06 -07:00
Micah Lee
a513c8b6df
Don't load strings directly in the web module. It isn't needed anymore, and it's preventing tests from passing in travis-ci
2017-05-22 15:02:22 -07:00
Micah Lee
174c03e892
Remove version string from http response headers, to avoid any information disclosure about the sender's server
2017-05-22 14:58:23 -07:00
Micah Lee
e01716bca9
Merge branch '253-security-headers' of https://github.com/mig5/onionshare into mig5-253-security-headers
2017-05-22 14:56:32 -07:00
Miguel Jacq
3766a6048d
Add desktop notification messages on download events (via systray)
2017-05-22 16:47:23 +10:00
Miguel Jacq
16f4d5f3ca
use the actual OnionShare version as the Server header string
2017-05-21 10:30:37 +10:00
Miguel Jacq
38ee7fde21
Remove duplication of security headers
2017-05-21 10:03:18 +10:00
Miguel Jacq
3641f376b7
Reinstate the alternative method of shutting down the web server - necessary for clicking 'Stop sharing' from GUI
2017-05-20 17:37:12 +10:00
Miguel Jacq
6c52988842
Harden some response headers
2017-05-20 12:34:00 +10:00
Miguel Jacq
55cb3b78cf
Remove onionshare-gui symlink pointing to itself
2017-05-19 14:15:54 +10:00
Micah Lee
d3eeda887b
In bundled Tor mode, wait 2 full seconds before connecting to the Tor controller
2017-05-18 17:34:36 -07:00
Miguel Jacq
c875e923d2
Wait a bit longer before attempting to connect to the Tor controller
2017-05-19 09:45:54 +10:00
Micah Lee
1bbcd6f5ea
Update get-tor-osx.py to grab the Tor binary from Tor Browser 6.5.2 instead of 6.5.1, and make it retain the same directory structure in OnionShare as it uses in Tor Browser, including copying libevent-2.0.5.dylib, which was missing before ( #385 )
2017-05-18 11:22:50 -07:00
Miguel Jacq
8a1fad7a79
#345 - validate the readability of files before adding them
2017-05-18 18:09:49 +10:00
Micah Lee
d3a7eef95c
Catch errors that occur when connection_type is bundled_tor, but the tor process closes before it can connect
2017-05-17 12:00:42 -07:00
Micah Lee
010bddb066
When saving settings, if Tor settings changed or if Tor isn't connected, reboot the Onion object, so that it's always connected to Tor when using the app
2017-05-16 16:50:33 -07:00
Micah Lee
22fb34d50d
Fixed signal/slot/thread issue in TorConnectionDialog and TorConnectionThread, and updated the language of bundled Tor error messages
2017-05-16 13:09:27 -07:00
Micah Lee
18ba940669
Made Settings debug log less verbose
2017-05-16 13:01:57 -07:00
Micah Lee
852a6761ee
Make the Onion object poll the tor controller less frequently, now that the connection happens in a separate thread
2017-05-16 11:47:18 -07:00
Micah Lee
388202e1ea
Move connecting to Tor into its own separate thread
2017-05-16 11:44:34 -07:00
Micah Lee
9c166a07d2
Add debug logging to Onion, OnionShare, and Settings objects
2017-05-16 11:23:18 -07:00
Micah Lee
7003349873
Add log() method to onionshare.common, which logs to stdout if in debug mode
2017-05-16 11:12:55 -07:00
Micah Lee
1591888863
Renamed onionshare.helpers module to onionshare.common
2017-05-16 11:05:48 -07:00
Micah Lee
219c4351e1
Pass debug into the Onion and OnionShareGUI objects
2017-05-16 10:57:59 -07:00
Micah Lee
2ca92c52db
Move owernship of the TorConnetionDialog objection from __init__.py into the OnionShareGUI class, and make it so when the Tor connection gets canceled, OnionShare quits
2017-05-14 18:30:45 -07:00
Micah Lee
dc23946fe8
Fixed various issues introduced by creating an singleton Onion object and passing it into the OnionShare object
2017-05-14 17:21:13 -07:00
Micah Lee
984d3f9c11
Merge branch 'master' into tor-bundle-autoupdate
2017-04-18 16:07:46 -07:00
Micah Lee
2f426fb8b2
Merge branch 'tor-bundle' into autoupdate
2017-04-18 16:00:24 -07:00
Micah Lee
6d58d5dcff
Added support for bundled Tor in macOS
2017-04-18 15:12:24 -07:00
Micah Lee
90e82217e7
Onion calls tor_status_update_func much more frequently, which makes the GUI more responsive
2017-04-17 20:54:55 -07:00
Micah Lee
6c02984a98
Add an Onion exception for canceling connecting Tor
2017-04-17 20:49:06 -07:00
Micah Lee
71dc65edee
Began making a TorConnectionDialog, which handles connecting to the Tor network
2017-04-17 20:26:35 -07:00
Micah Lee
9f43b7298c
Move OnionShare object into its own file, so __init__ is just CLI logic
2017-04-17 19:28:51 -07:00
Micah Lee
593c9e9afe
Make it so ctrl-c actually quits the CLI version
2017-04-17 19:22:40 -07:00
Micah Lee
6b5dfe62c0
Added helper function get_available_port(), and use it to avoid code duplication. Removed unused is_root() helper function. Refactored Onion object to not try to connect in the constructor.
2017-04-17 19:13:53 -07:00
Micah Lee
bb990ff574
Removed transparent_torification from the full app, and refactored OnionShare class to get passed in an Onion, and doesn't get passed in stealth.
2017-04-17 19:12:02 -07:00
Micah Lee
fa12784f8b
Added Tor SOCKS address and port settings
2017-04-15 16:33:41 -07:00
Micah Lee
4b11bd00c5
Added autoupdate settings to Settings, and also to the settings dialog
2017-04-15 15:24:08 -07:00
Micah Lee
e4cdfa6c99
Make sure tor process is killed in a more robust manner, and also increase tor connection timeout to 45 seconds
2017-04-15 11:43:19 -07:00
Micah Lee
0ddcda1570
Don't use shell=true in subprocess, and instead hide the console window in Windows using the startupinfo arg
2017-04-15 11:34:03 -07:00
Micah Lee
9b3cee0878
Added support for bundled tor connection type in Windows, including using ports instead of socket files
2017-04-14 18:33:44 -07:00
Micah Lee
6200cb3b08
Increase Tor connection timeout to 30 seconds
2017-04-14 10:32:15 -07:00
Micah Lee
ffc2e23981
Connecting to Tor now times out of 10 seconds
2017-04-14 10:00:56 -07:00
Micah Lee
87e969fc4a
Change the settings to default to bundled connection type instead of automatic
2017-04-13 23:20:24 -07:00
Micah Lee
1fa88c3d07
Add Tor connection status to the main window status bar
2017-04-13 23:08:25 -07:00
Micah Lee
80d475f65b
In the settings dialog, show Tor connection status when the connection type is bundled
2017-04-13 22:56:47 -07:00
Micah Lee
169be518eb
Connecting to Tor in bundled mode now creates a temporary tor data dir, starts a new tor process, and connects to it. Also, refactored Settings dialog to allow Linux to use bundled tor as well
2017-04-13 22:22:34 -07:00
Micah Lee
da225ed7d1
Started to implement Bundled Tor connection settings
2017-04-08 18:10:17 -07:00
Micah Lee
848d8db34e
Added close_after_first_download and use_stealth to settings, and also to the GUI settings dialog
2017-04-08 13:42:07 -07:00
Micah Lee
6c074e4e3e
In Whonix, listen on 0.0.0.0 instead of 127.0.0.1 ( #220 )
2017-02-22 18:42:41 -08:00