Commit Graph

656 Commits

Author SHA1 Message Date
Micah Lee
6632a4b426
Add two new receive mode settings: receive_allow_receiver_shutdown and receive_public_mode 2018-04-28 21:08:53 -07:00
Micah Lee
1a4aaa70fa
Fix a race condition where the URL was sometimes getting copied to the clipboard before it was actually generated, causing a crash 2018-04-28 15:00:23 -07:00
Micah Lee
1456361566
Generalize the handling of Tor exceptions, more logging in Web 2018-04-28 13:59:36 -07:00
Micah Lee
406515085e
Fixed crash when starting recieve mode server 2018-04-27 23:19:46 -07:00
Micah Lee
c6a2cab529
Make Web's the REQUEST_ constants static attributes 2018-04-26 11:00:59 -07:00
Micah Lee
9e9f65572b
Instead of creating a Web object and passing it into OnionShareGui, now each mode creates its own separate Web object, instantiated in its own way 2018-04-26 09:30:53 -07:00
Micah Lee
4b957f3271
Merge branch 'receiver-mode' into receiver-mode-gui 2018-04-24 17:22:06 -07:00
Micah Lee
aa8c07c434
In CLI recieve mode, tell the user where to look for uploaded files 2018-04-24 17:18:18 -07:00
Micah Lee
b6b61f753d
Update GPL copyright year 2018-04-24 10:07:59 -07:00
Micah Lee
2ee7e74236
Remove the desktop notification setting -- everyone gets them now 2018-04-24 09:26:06 -07:00
Micah Lee
91536ea571
Fix a few bugs that I missed when merging in develop 2018-04-22 17:46:14 -07:00
Micah Lee
bd7305ab16
Add new WSGI middleware just to attach the Web object to environ, and improve the UI of file upload progress 2018-03-21 18:27:42 -07:00
Micah Lee
f7640416eb
Remove the WSGI middleware, because I'm solving the problem in a different way 2018-03-21 17:51:42 -07:00
Micah Lee
facd441caf
For receive mode, use a custom flask Request, and a custom TemporaryFile, in order to keep track of file upload progress 2018-03-21 17:34:11 -07:00
Micah Lee
aafa9b1543
Add WSGI middleware in order to capture the progress of POST request uploads 2018-03-19 02:25:22 -07:00
Micah Lee
fee1d49563
Fix bug with shutdown_slug 2018-03-14 08:33:25 -07:00
Micah Lee
72698a7247
Display a template after closing the server, and standardize the style of other simple templates 2018-03-14 08:30:14 -07:00
Micah Lee
01f86daf8f
In receive mode, allow uploader to close the server when they are done 2018-03-14 08:16:09 -07:00
Micah Lee
0b10e71547
Add receive mode warning, and print notification for each upload, in CLI mode 2018-03-14 07:35:04 -07:00
Micah Lee
01dd16d92f
Uploading files works in CLI 2018-03-14 04:03:50 -07:00
Micah Lee
000d9620c1
Add flash messages to receive template, and begin implementing upload POST 2018-03-13 05:50:26 -07:00
Micah Lee
8e82c07039
Fixed bug in validating downloads dir related to moving settings into common 2018-03-13 03:59:52 -07:00
Micah Lee
76d299a6c9
Move settings into the Common object, so the settings are available to all objects (including Web, which is required for receive mode) 2018-03-13 03:28:47 -07:00
Micah Lee
c2fecf8aa4
Fix tests after refactoring Common 2018-03-13 02:22:26 -07:00
Micah Lee
50409167d4
Completely refactor common to make a Common class, and pass that class down into all parts of the program 2018-03-08 10:18:31 -08:00
Micah Lee
49e352d131
Rename close_after_seconds class to ShutdownTimer 2018-03-08 05:50:23 -08:00
Micah Lee
2e6538b7f8
Move ZipWriter from common into web, because that's the only place it's used 2018-03-08 05:45:07 -08:00
Micah Lee
878dd4f880
In CLI, validate downloads_dir when starting in receive mode 2018-03-06 07:40:57 -08:00
Micah Lee
e980bc153b
Change default receive mode download directory to ~/OnionShare 2018-03-06 05:25:49 -08:00
Micah Lee
5d42e76eb8
Show different message for receive mode than for send mode 2018-03-06 03:24:17 -08:00
Micah Lee
649afa2fad
Move (optional) javascript into file, and use CSP to ban inline js 2018-03-06 03:17:54 -08:00
Micah Lee
4606a3ad3a
Stop using inline css, and reorganize static folder 2018-03-06 03:03:24 -08:00
Micah Lee
ce852fc60a
Create separate templates and static folder, and make the web app use both of these. Yay, now we have real static resources 2018-03-06 02:54:12 -08:00
Micah Lee
baede53632
Make separate template for send and receive mode 2018-03-06 02:06:44 -08:00
Micah Lee
fa9f714651
Make separate routes for send and receive modes 2018-03-06 01:50:43 -08:00
Micah Lee
4a0c6e8dcd
Refactor OnionShareGui to use new Web class 2018-03-06 00:56:40 -08:00
Micah Lee
0cec696055
Refactor web.py to move all the web logic into the Web class, and refactor onionshare (cli) to work with it -- but onionshare_gui is currently broken 2018-03-05 11:06:59 -08:00
Micah Lee
cd1a1d9638
Web needs to know about receive mode, not the OnionShare object 2018-03-05 08:48:04 -08:00
Micah Lee
383ccb94fc
Add downloads_dir to settings, make it default to ~/Downloads 2018-03-05 07:52:51 -08:00
Micah Lee
18ac830a9e
Add command line flag for receive mode 2018-03-05 07:45:10 -08:00
Micah Lee
49fa2805e7
Merge branch 'cancel_share' of https://github.com/mig5/onionshare into mig5-cancel_share 2018-02-25 16:14:59 -08:00
Miguel Jacq
096c202362
Add ability to cancel a share 2018-02-25 17:44:27 +11:00
Micah Lee
79b461d071
Merge branch 'develop' into 641_fix_images_windows 2018-02-24 19:40:23 -08:00
Micah Lee
3797e9e203
When using <img>, put the src in quotes. Otherwise the filename is likely to have spaces in it, and the <img> src will break. Also, in Windows use backslashes for local resources instead of forward slashes 2018-02-24 18:38:40 -08:00
Micah Lee
e76b1e0c28
Merge branch 'remove_platform_re' of https://github.com/delirious-lettuce/onionshare into delirious-lettuce-remove_platform_re 2018-02-24 17:56:35 -08:00
Miguel Jacq
cff267c09c Revert the cancel feature that causes issues at least on macOS (#637) 2018-02-25 12:31:32 +11:00
delirious-lettuce
641fec7c05 Remove use of re module by using str.endswith 2018-02-24 15:44:23 -07:00
Miguel Jacq
dface51dd0
Merge pull request #588 from micahflee/ux-update
Major user experience update
2018-02-25 08:27:46 +11:00
Micah Lee
bb3f18ee00
Merge branch 'develop' of https://github.com/irykoon/onionshare into irykoon-develop 2018-02-22 16:57:06 -08:00
Micah Lee
3d1c0eabc4
Merge branch 'develop' into mig5-info_widgets_download_info 2018-02-19 18:02:51 -08:00
Micah Lee
5ac6bb783f
Merge branch 'sortable_tables' of https://github.com/mig5/onionshare into mig5-sortable_tables 2018-02-19 16:45:58 -08:00
Miguel Jacq
b7df7f8dc9
merge ux-update in, and fix conflict 2018-02-20 07:47:21 +11:00
Miguel Jacq
6791e59aa5
reset done to False if a download is still in progress 2018-02-19 12:47:21 +11:00
irykoon
b2c310f2e0
Support meek_lite Pluggable Transport
Currently, meek/meek_lite is one of the few, if not only, mature pluggable transport that works in some heavily cenosored areas, for example, China. Therefore, this can be a nice feature to have.
2018-02-15 23:19:53 +00:00
Miguel Jacq
062101fcbf
Make table sortable with javascript (if enabled) 2018-02-14 16:56:03 +11:00
Miguel Jacq
267aa7dfec
Pass the correct parameter to remove_ephemeral_hidden_service()
Add debug logs to verify if an onion was successfully deleted or not
2018-02-12 13:43:36 +11:00
Miguel Jacq
145293d3cc
Fix function name remove_ephemeral_onion_service 2018-02-12 13:17:31 +11:00
Micah Lee
d3848a25ec
Redesigned HTML/CSS download page 2018-02-10 16:19:23 -08:00
Micah Lee
a7ab1d7e6e
Add onionshare favicon to all HTML pages 2018-02-10 12:50:23 -08:00
Miguel Jacq
39954c6ee8
Allow the user to cancel a share that is still starting up 2018-02-09 18:43:57 +11:00
Micah Lee
05633673fc
Move auto-stop timer into settings, so its UI does not show up unless the user specifically enables that feature 2018-02-07 09:55:55 -08:00
Miguel Jacq
d1ce17cf5f
Merge pull request #585 from torbsd/openbsd-port-patches-2
Second attempt at patches for an OpenBSD port
2018-02-07 16:54:00 +11:00
attila
bc8f233db9 Update patch as per the suggestion by @mig5 on
https://github.com/micahflee/onionshare/pull/585
Tested on current snapshot, both gui and cli work
2018-02-06 16:39:04 -05:00
attila
ae494c8e33 Second attempt at patches for an OpenBSD port, this time based off of 1.2
and after feedback from the upstream and other contributors at
https://github.com/micahflee/onionshare/pull/489
2018-02-05 18:06:37 -05:00
Miguel Jacq
16bd3291e3
Support for obfs4 in custom bridges 2018-01-19 15:31:11 +11:00
Miguel Jacq
206472cb78
load Settings in onionshare/__init__.py before we initiate the web thread, since it needs to send the saved slug to the web server 2018-01-18 22:42:43 +11:00
Micah Lee
f499b126cc
Temporary fix for #550 2018-01-17 18:53:45 -08:00
Micah Lee
713e45084a
Merge branch '435_support_bridges' of https://github.com/mig5/onionshare into mig5-435_support_bridges 2018-01-17 16:19:30 -08:00
Miguel Jacq
9ed748db86
load the Settings in onionshare/__init__.py later, so that when saving slug, the private_key/hidservauth string have already been saved by the Onion object 2018-01-18 08:14:36 +11:00
Miguel Jacq
40ee114803
Extract tor and obfs4proxy executables from the main TorBrowser executable with 7-zip on Windows 2018-01-17 12:45:37 +11:00
Miguel Jacq
76cf0ae107
Fix conflicts arising from the reuse_private_key branch 2018-01-16 15:30:36 +11:00
Micah Lee
808c4cfac2
Merge branch 'check_is_valid_file' of https://github.com/mig5/onionshare into mig5-check_is_valid_file 2018-01-14 18:54:48 -08:00
Miguel Jacq
284213aa2d
support obfs4 via obfs4proxy on macOS 2018-01-15 12:49:29 +11:00
Miguel Jacq
3e7d4c64ff
Save the slug when using a persistent private key 2018-01-15 10:01:34 +11:00
Miguel Jacq
f656bafd4c
Catch the OSError in CLI mode when a file/folder can't be zipped up, and error out more gracefully 2018-01-14 20:36:43 +11:00
Miguel Jacq
d9e6650a19 Merge branch 'master' into check_is_valid_file 2018-01-14 20:24:02 +11:00
Miguel Jacq
bdb10b7eeb
Resolve conflict with upstream's onion.py 2018-01-14 18:53:46 +11:00
Miguel Jacq
448f6af796
Resolve conflict with upstream's onion.py 2018-01-14 18:49:49 +11:00
Miguel Jacq
4da5ddf2c9
Resolve conflict with upstream's onion.py 2018-01-14 18:45:10 +11:00
Micah Lee
a75faea407
Merge branch 'mig5-493_500_detect_broken_tor_connection' 2018-01-13 22:50:57 -08:00
Micah Lee
a73f1471a2
Better way to get the onion service_id 2018-01-13 19:18:33 -08:00
Micah Lee
597008d380
Merge branch '525_catch_failure_to_obtain_service_id' of https://github.com/mig5/onionshare into mig5-525_catch_failure_to_obtain_service_id 2018-01-13 19:09:03 -08:00
Micah Lee
ebbe490a65
Merge branch '493_500_detect_broken_tor_connection' of https://github.com/mig5/onionshare into mig5-493_500_detect_broken_tor_connection 2018-01-13 16:32:56 -08:00
Micah Lee
5e98a9c283
Merge branch 'Increasing-the-timeout' of https://github.com/Baccount/onionshare into Baccount-Increasing-the-timeout 2018-01-13 13:46:51 -08:00
Miguel Jacq
e90908c5b0
Move the saving of private key into the SettingsDialog and Onion objects entirely (no QPushButton to save it) 2018-01-13 20:58:24 +11:00
Micah Lee
36968a45cb
Merge branch 'master' of https://github.com/wondratsch/onionshare 2018-01-12 18:58:41 -08:00
Miguel Jacq
9b3963799e
catch error in start_onion_service in case we somehow failed to parse a service_id in Stem controller response 2018-01-02 16:35:48 +11:00
Miguel Jacq
2e5b9b37a9
4096 byte dir check is not consistent across platforms, remove it for now 2018-01-02 09:46:00 +11:00
Miguel Jacq
9154faf351
Check the file is a valid file or dir (not just that it exists) 2018-01-02 09:36:57 +11:00
Baccount
c324cd55da
Update onion.py 2017-12-26 22:53:44 -08:00
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
Micah Lee
34301d3088
Catch Tor protocol error exceptions when starting an onion service (#344) 2017-02-22 16:45:52 -08:00
Micah Lee
1336a1c3b4
Update comments to be more accurate 2017-02-22 15:28:06 -08:00
Micah Lee
6370139d2e
Rip out support for non-ephemeral onion services 2017-02-22 14:10:06 -08:00
Micah Lee
a57703cb5a
Properly handle KeyboardInterrupt exception in CLI in macOS 2017-02-22 13:35:34 -08:00
Micah Lee
248f59cbd1
Renamed 'resources' to 'share', and updated location of 'share' files in OSX/Win binaries 2017-02-21 16:59:14 -08:00
Micah Lee
6f5a3aedbb
Update helpers.get_resource_path to correctly find resources in frozen macOS app bundles 2017-02-21 14:34:34 -08:00
Micah Lee
12acb893f8
Add new AuthenticationFailure exception, and make the Onion/stem code catch more exceptions when connecting to a Tor controller 2017-01-07 17:31:26 -08:00
Micah Lee
db052ce85f
Moved onionshare and onionshare_gui logic directly into __init__.py files 2017-01-06 19:00:08 -08:00
Micah Lee
f8005a63ea
Change GPL copyright from 2016 to 2017 2017-01-06 18:58:15 -08:00
Micah Lee
f14b5ebfa1
Catch exceptions for guessing default Tor Browser socket file path 2017-01-06 11:54:42 -08:00
Micah Lee
d069cc2a29
Guess the default socket file path for new versions of Tor Browser in OS X 2017-01-06 11:46:41 -08:00
Garrett Robinson
406fffdb39 Make render_template_string autoescape by default in Flask versions < 0.11 2016-12-30 13:04:19 -05:00
Garrett Robinson
bfbf006c57 Revert "Added a function to remove HTML from file and directory names"
This reverts commit 11c5f5b699.
2016-12-30 12:04:09 -05:00
Garrett Robinson
e1f9957f56 Revert "Replaced sanitize_html() function that was based on regex with python3's html.escape()"
This reverts commit cff11cd7e4.
2016-12-30 12:02:40 -05:00
Micah Lee
50835b67f8
You must connect to a socket file instead of a port for Tor Browser 6.5a6. Make automatic settings fallback to socket file if the port doesn't work (only for Linux so far, have not tested in OS X, and is not supported in Windows) 2016-12-29 13:36:29 -08:00
Micah Lee
a0abab3653
Make automatic settings work with with Tor Browser 6.0.8 2016-12-29 12:57:58 -08:00
Micah Lee
ebf13cfa11
Handle new Tor controller errors in CLI 2016-12-29 10:16:20 -08:00
Micah Lee
b8e797049b
Display information about tor when testing settings is successful 2016-12-29 10:03:29 -08:00
Micah Lee
19d020f245
Onion now connects to the Tor controller using the settings in Settings (except automatic still needs some work), and the settings dialog handles error when testing settings 2016-12-29 09:58:13 -08:00
Micah Lee
5bfa4da648
Refactor Settings object so it does not load from file by default. Make it so you can pass a Settings into Onion, to test settings 2016-12-29 08:02:32 -08:00
Micah Lee
9462b7d05f
Clicking Save in the settings dialog saves settings 2016-12-28 20:03:32 -08:00
Micah Lee
c9607cf986
Remove wrong comment 2016-12-28 19:53:02 -08:00
Micah Lee
25109c8a66
Created a Settings object, which loads and saves settings to file, and made the Settings dialog use the settings from this object 2016-12-28 19:52:21 -08:00
Sigma
7fe9f3be13 Support stem versions older than 1.5.0 again. Fix for issue #332 2016-12-25 22:27:47 -08:00
Micah Lee
6eed7258a7
Properly handle errors for using stealth onion services in the GUI, instead of crashing in the background (#144) 2016-12-23 19:08:18 -08:00
Micah Lee
6fdef85878
Catch all exceptions when checking for stealth support, not just TypeError, to successfully identity old versions of stem 2016-12-22 17:07:01 -08:00
Micah Lee
eff0d3729a
Add support for stealth onion services in CLI version 2016-12-22 16:56:39 -08:00
Micah Lee
fd41eac48d
Added dev scripts for launching onionshare and onionshare-gui from the source code tree, without having to install it 2016-12-22 16:19:54 -08:00
Micah Lee
eb00a29ca7
Merge branch 'master' of https://github.com/eightnoteight/onionshare into eightnoteight-master
Conflicts:
	onionshare/web.py
	onionshare_gui/onionshare_gui.py
	resources/locale/cs.json
	resources/locale/eo.json
	resources/locale/nl.json

This merge required quite a bit of refactoring because.
2016-12-22 16:00:06 -08:00
Micah Lee
e46c4f510a
Add support for Tor control port authentication 2016-12-22 13:39:32 -08:00
Micah Lee
05e25b120a
Merge branch 'shutdowncrashfix' of https://github.com/b3sigma/onionshare into b3sigma-shutdowncrashfix 2016-12-21 23:08:33 -08:00
Micah Lee
cff11cd7e4
Replaced sanitize_html() function that was based on regex with python3's html.escape() 2016-12-21 22:56:15 -08:00
Sigma
58d8f55a63 Fix crash when tor is closed first and then onionshare is closed and a stem.SocketClosed exception is raised. 2016-12-20 01:44:20 -08:00
Emmanuel Morales
11c5f5b699 Added a function to remove HTML from file and directory names 2016-12-18 21:07:38 -08:00
xSmurf
4f464aaf2c Only check if we are in the sys prefix but not the actual executable name as this could be renamed or wrapped 2016-09-28 17:24:28 +00:00
anonym
c74d892968 Try to get the Tor ControlPort from the environment.
... via the TOR_CONTROL_PORT variable. If set, onionshare will only
try this port.
2016-09-22 14:10:24 +02:00
Micah Lee
76937d5cb5
Move imports to module level 2016-09-06 13:17:55 -07:00
Micah Lee
7a46336149
Enable stdout in Windows, OSX CLI versions (#305) 2016-09-06 12:09:10 -07:00
Micah Lee
e093c7298a Disable writing to stdout in Windows (fixes #304) 2016-09-06 18:44:35 -07:00
Micah Lee
7ab936cec2
Prevent canceling download from being confused with rate limit attacker 2016-09-06 10:18:50 -07:00
Micah Lee
87761c6fce
Remove HSDirError exception, because it is no longer thrown 2016-09-05 11:32:30 -07:00
Micah Lee
360fb6cfcc
Refactor onionshare CLI to use await_publication=True when using ephemeral onion services, instead of relying on wait_for_hs function 2016-09-05 11:29:12 -07:00
Micah Lee
1372239ed7
Renamed hs to onion 2016-09-05 11:16:54 -07:00
Micah Lee
db9d81ba90
Migrate from PyInstaller to cx_Freeze for OSX 2016-09-04 19:21:09 -07:00
Micah Lee
bba46e088f
Merge branch 'master' into cx_Freeze 2016-09-04 17:23:27 -07:00
Micah Lee
dbf4af02ac Pass helpers into strings.load_strings instead of importing it, so fix issue with cx_Freeze in Windows 2016-09-04 20:09:18 -07:00
Micah Lee
7e8b3e1750 Oops, use spaces instead of tabs 2016-09-04 20:08:36 -07:00
Micah Lee
8e8ea9c357 Added resources to cx_Freeze setup, and make those resources findable by the app 2016-09-04 19:54:45 -07:00
Micah Lee
310d861ce0
Stop saying 'hidden service', start saying 'onion service' 2016-09-04 17:23:06 -07:00
Srinivas Devaki
c570d7ea77 added progress bar for zipping files 2016-08-24 01:43:21 +05:30
Micah Lee
62e7035d3d
Tweaked Spanish locale and typo in comment, thanks to kant (#269, #270) 2016-06-10 17:24:44 -07:00
Micah Lee
7f438052c6 Merge pull request #288 from mscherer/fix_cve
Fix CVE-2016-5026
2016-06-10 17:18:36 -07:00
Micah Lee
185006d662 Merge pull request #280 from jvoisin/pep8
Improve pep8 conformance
2016-06-10 17:14:11 -07:00
Michael Scherer
70c55511b1 Fix CVE-2016-5026
See http://www.openwall.com/lists/oss-security/2016/05/23/5 for details
on a potential convoluted attack. Basically,  /tmp/onionshare is
a predictable name, which mean that a local attacker
could precreate it on a shared server and later mess with the hidden
service operations in various way.
2016-05-23 20:45:07 +02:00
jvoisin
17e389b800 Improve pep8 conformance 2016-04-18 01:40:17 +02:00
jvoisin
3d13c1aa27 Simplify get_resource_path 2016-04-18 01:12:59 +02:00
Micah Lee
db1ed7c6de Fix issue with shutting down Flask server when not using --local-only (#238) 2016-04-12 17:04:19 -07:00
Micah Lee
d35b5a9acd Added rate-limiting to GUI. After 20 404 errors, server automatically stops (#238) 2016-04-12 16:49:46 -07:00
Micah Lee
b47ef630d5 Replace onionshare slug with 2-words from securedrop diceware list (#238) 2016-04-12 16:29:11 -07:00
Micah Lee
c07f4e5f83 If "Stop sharing automatically" is selected, only allow one download at a time (fixes #248) 2016-04-12 15:59:49 -07:00