Micah Lee
87d94f68e8
Don't update the GUI at all untless it has been told about the request
2019-01-21 11:16:55 -08:00
Micah Lee
1be10f1e02
Prevent ReceiveModeRequest.file_write_func from sending a message to the GUI if the request should be closed
2019-01-21 10:56:31 -08:00
Micah Lee
04e4385667
In receive mode, only tell the GUI that a new request is coming in if it contains files
2019-01-20 16:20:36 -08:00
Micah Lee
b6928a6d0e
Oops, I missed this when resolving merge conflicts
2019-01-20 16:00:18 -08:00
Micah Lee
0ef0659e2f
Merge branch 'develop' into 866_receive_mode_crash
2019-01-20 15:42:09 -08:00
Micah Lee
b75757ee49
- Refactor the Web.ShareMode client_cancel variable to be Web.stop_q, a thread-safe queue that communicates to both share and receive mode when the user stops the server. In share mode this still stops sending the file. In receive mode, if there's a transfer in progress, it cancels it in the middle, and doesn't end up saving that file
...
- In receive mode, make the receive mode dir right before saving a file (so if it doesn't complete, don't make an empty dir)
- Minor UX tweak: resizing the window stretches the History widget first
2019-01-20 15:25:36 -08:00
Micah Lee
b1d5b29cf6
Change version of Tor that supports v3 onion services to 0.3.5.7
2019-01-20 12:15:27 -08:00
Micah Lee
6e3b103ef5
Rename receive mode "downloads_dir" to the OnionShare "data_dir"
2019-01-20 11:46:20 -08:00
Micah Lee
3bbff7e85a
Finish removing web event REQUEST_CLOSE_SERVER, which used to be a receive mode feature to allow the Tor Browser user to close the server, but we removed
2019-01-19 20:43:25 -08:00
Micah Lee
5d7449c476
Use os.path.expanduser when creating data dir, and no need to try creating data dir in Settings.save because it's created in Config.build_data_dir
2018-12-21 10:46:09 -08:00
Micah Lee
415c01e00a
Merge branch 'develop' of https://github.com/ageis/onionshare into ageis-develop
2018-12-21 10:40:49 -08:00
Micah Lee
e501bb4de8
Make settings dialog checkboxes line up in macOS
2018-12-20 14:02:52 -08:00
Kevin Gallagher
64cc9427e5
Make sure the OnionShare data directory is created
...
Fixes #850
2018-12-19 16:07:16 -08:00
Micah Lee
6e0081ceba
pwd module doesn't exist in Windows
2018-12-19 11:45:31 -08:00
Micah Lee
187b7887fd
Merge branch '846_mac_packaging' into 406_osx_sandbox
2018-12-18 19:21:50 -08:00
Micah Lee
e6f26f6545
When discovering default locale, default to english if locale.getdefaultlocale() returns None. Also, make locales that include country codes (pt_PT and pt_BR) actually work as default locales
2018-12-18 18:53:40 -08:00
Micah Lee
a06bb0878f
When enabling debug mode in Web, use common.build_data_dir() to get data dir path
2018-12-16 17:20:28 -08:00
Micah Lee
043237bc20
Merge branch 'develop' into 406_osx_sandbox
2018-12-16 17:11:18 -08:00
Micah Lee
c059af97e1
Merge pull request #831 from micahflee/812_fix_v3_onions
...
[WIP] Fix v3 onion services
2018-12-16 17:01:40 -08:00
Micah Lee
1f3728e8c5
If a locale file includes a blank string, fallback to English instead of using the blank string
2018-12-16 10:55:13 -08:00
Micah Lee
b02e1c257f
Change filename of flask debug log file, store it in the OnionShare data dir instead of /tmp
2018-12-11 08:06:14 -08:00
Micah Lee
919fdeb096
When debug mode is enabled, don't log flask errors to disk
2018-12-11 07:16:44 -08:00
Micah Lee
1cf816b24b
Fixed typo in comment
2018-12-10 07:18:25 -08:00
Micah Lee
caf31090bf
Split pt locale into pt_BR and pt_PT
2018-12-08 11:25:06 -08:00
Micah Lee
300434e5ec
Update settings dialog tests to use an OnionStub instead of an Onion, and test different states of tor (authenticate and not, supports v3 and not)
2018-12-05 23:05:25 -08:00
Micah Lee
657806a003
Only allow starting v3 onion services if the tor that we're connected to supports it
2018-12-05 20:46:01 -08:00
Micah Lee
1d1efb7e54
Require tor 0.4.0.0 for v3 onion services (will change in the future). And update settings dialog so if the connected version of tor doesn't support v3 onions, then always show legacy options. If it does support v3 onions, allow 'Use legacy addresses'
2018-12-05 20:33:45 -08:00
Micah Lee
aadb2a01f0
Only show onion settings if there is a Tor connection
2018-12-05 20:14:52 -08:00
Micah Lee
c7ef1bba39
Merge pull request #752 from mig5/receiver-mode-gui-hold-timeout-share-open-til-upload-finished
...
Hold a share open if its timer has expired but a file is still uploading.
2018-12-05 09:13:54 -08:00
Micah Lee
942f4f6bac
Merge branch 'develop' into 406_osx_sandbox
2018-11-26 18:07:12 -08:00
Micah Lee
6bfe9d4476
Merge pull request #763 from mig5/open_folder_uploads_macos_windows
...
Open folder containing uploads with the file selected, in macOS and Windows
2018-11-26 18:03:52 -08:00
Micah Lee
33bd7b4a80
Build downloads_dir a different way in macOS, so it's correct despite the sandbox
2018-11-25 17:48:11 -08:00
Micah Lee
250dbf9199
Make sure downloads_dir exists after loading settings
2018-11-25 17:34:06 -08:00
Micah Lee
4934032144
Make tor data dir always be a tempdir inside OnionShare's data dir
2018-11-25 17:17:56 -08:00
Micah Lee
2cbe8979ab
Make macOS use Tor control ports instead of unix sockets to connect to the Tor controller
2018-11-25 16:50:20 -08:00
Micah Lee
845d7f8564
Display tor_data_directory as debug log
2018-11-25 16:26:54 -08:00
Micah Lee
d8b873a208
Create a group container for macOS sandbox, and on Mac put the Tor data dir in it
2018-11-25 16:15:27 -08:00
Micah Lee
5f011e9ed6
Fix bug related to persistent addresses when using v2 onion services
2018-11-25 13:14:56 -08:00
Micah Lee
e29c0e7b69
Merge branch 'develop' into v3-revisited
2018-11-18 17:04:20 -08:00
Miguel Jacq
17aa34edd9
remove debug log
2018-11-13 15:06:28 +11:00
Miguel Jacq
d3b5e1e256
Merge develop branch and fix conflicts
2018-11-13 14:45:40 +11:00
Miguel Jacq
db8548c35b
Try and fix closing the request for a valid upload post-timer expiry, whilst still rejecting subsequent uploads
2018-11-13 14:42:26 +11:00
Micah Lee
f5e0e9dd62
Fix tests so they recognize the new receive mode location
2018-10-26 15:08:55 -07:00
Micah Lee
65b4afeba3
Communicate the receive mode dir to the GUI, so clicking the open folder button opens the file manager to the correct directory
2018-10-25 21:38:20 -07:00
Micah Lee
6233487ecd
Receive mode puts files in a directory based on the timestamp of the upload
2018-10-25 21:13:16 -07:00
Micah Lee
1be53c633a
Remove the whole onionkey module, and generate onion keys using stem 1.7.0
2018-10-11 19:38:05 -07:00
Miguel Jacq
86b537a4a6
Fix conflicts
2018-10-11 13:04:48 +11:00
Micah Lee
ac10b8899f
Merge branch '780_improved_ui' into 690_language_dropdown
2018-10-10 18:32:01 -07:00
Micah Lee
5616a6a965
Make the history indicator label circular again
2018-10-09 21:49:05 -07:00
Micah Lee
6227c6cbc5
Set min width and height so everything always looks good, and change onion address to monospace font
2018-10-09 20:51:10 -07:00
Miguel Jacq
875b538347
Make auto-stop timer work on CLI when an upload is still in progress on expiry
2018-10-02 15:41:29 +10:00
Miguel Jacq
61d2e6cc5f
Try to fix logic handling last upload after timer expiry
2018-10-02 08:22:08 +10:00
Miguel Jacq
e9148ddb49
remove unused variable
2018-10-02 07:33:13 +10:00
Miguel Jacq
7d140f384f
remove uploads_in_progress list from web side
2018-10-01 19:18:50 +10:00
Miguel Jacq
9e14514d25
Another unused variable
2018-10-01 19:17:50 +10:00
Miguel Jacq
d104af11dc
remove unused variable, whitespace
2018-10-01 19:15:58 +10:00
Miguel Jacq
3f32db2cca
Fix logic for handling an upload still in progress when timer runs out. Show thankyou page for last uploader post-timer expiry
2018-10-01 18:42:53 +10:00
Miguel Jacq
f653e8cc04
Merge develop in and fix upload/timer functionality so that it works as described. Still needs fixing to not throw a connection error to the lucky last uploader after their upload completes and server stops due to expiry having passed
2018-10-01 16:42:54 +10:00
Miguel Jacq
7e8a76be8a
Load default settings before parsing for any alternate config. Reload strings if an alternate config was passed in after
2018-10-01 15:32:53 +10:00
Micah Lee
a1f5b5964a
Remove the useless gui=True arg getting passed intro strings._ all over the place
2018-09-30 17:47:10 -07:00
Micah Lee
c572ab996a
Fix tests
2018-09-30 17:35:58 -07:00
Micah Lee
60afaaf338
Make printing the settings filename as debug statement instead of print
2018-09-30 17:18:56 -07:00
Micah Lee
c4f776c42a
Set OnionShare language based on the locale stored in settings, and prompt user to restart OnionShare after changing their language
2018-09-30 17:06:29 -07:00
Micah Lee
9d5f9d18ed
Translate language names to their own language
2018-09-30 16:18:40 -07:00
Micah Lee
64a4428465
Make Settings.available_locales be a dictionary mapping locale codes to language names in that language
2018-09-30 15:01:02 -07:00
Micah Lee
d28f38b1a0
Add locale to Settings, and make it default to the system locale, or English
2018-09-30 14:45:21 -07:00
Micah Lee
4b3a68bb65
Got the indicator label to display in the correct location for share mode
2018-09-29 14:40:55 -07:00
Micah Lee
e87263353f
Added an indicator count for share mode
2018-09-28 19:54:46 -07:00
Micah Lee
9a05eef494
Slightly improve Downloads progress bar style, but still needs spacing
2018-09-28 19:05:26 -07:00
Micah Lee
a5b549770a
Got empty Downloads looking good
2018-09-28 18:30:32 -07:00
Micah Lee
c0e6968b2b
Attempting to redesign Downloads
2018-09-28 17:01:48 -07:00
Micah Lee
75153db11e
Keep trying ports until it finds a free one
2018-09-27 21:22:10 -07:00
Micah Lee
d3410e7843
Merge pull request #789 from mig5/show_v3_onion_support
...
Show whether Tor version supports next-gen onion support
2018-09-26 17:09:34 -07:00
Miguel Jacq
3ed04bf5ec
Show whether Tor version supports next-gen onion support
2018-09-25 15:26:19 +10:00
Miguel Jacq
d34364530d
Analyse the right file size to determine if the download has finished in the UI (in order to decide whether to stop server yet)
2018-09-25 14:40:10 +10:00
Micah Lee
a1cddeb9a9
Access .upload_count from the correct object after the web refactor
2018-09-21 17:42:36 -07:00
Micah Lee
4d125bd3dc
Actually tell the GUI the progess
2018-09-21 17:08:11 -07:00
Micah Lee
017a4ebe31
Merge branch 'develop' into 663_zip_away
2018-09-21 16:23:49 -07:00
Micah Lee
09ccbf4a60
Dynamically figure out the total size of the download based on the whether or not the client making the http request accepts gzip
2018-09-21 16:22:37 -07:00
Micah Lee
98fcf4d0ac
Remove the 'using_ephemeral' string
2018-09-21 15:11:18 -07:00
Micah Lee
eac4e44dc5
Remove no_filenames string, and instead display CLI usage if you don't specify filenames
2018-09-21 13:58:42 -07:00
Micah Lee
2a309af680
If only sharing one file, compress it with gzip, and serve it with gzip compression if the browser supports it
2018-09-21 12:29:23 -07:00
Micah Lee
98aae9d83b
Pass common into ShareModeWeb and ReceiveModeWeb
2018-09-21 11:41:49 -07:00
Micah Lee
28fd67cbcc
Move more mode-specific logic out of the Web class and into the approprate mode web classes
2018-09-21 11:36:19 -07:00
Micah Lee
a86681e903
Refactor the CLI main function to explicitly use 'share' or 'receive' mode
2018-09-21 11:19:36 -07:00
Micah Lee
cc9f646f8b
Refactor web even more to all of the share and receive web logic into ShareModeWeb and ReceiveModeWeb classes
2018-09-21 11:14:32 -07:00
Micah Lee
8ce90fdd60
Refactor web to push share and receive mode logic into their respective files
2018-09-20 23:58:27 -07:00
Micah Lee
71ea9bf29e
Split the web module into different files for receive mode and share mode logic
2018-09-20 23:43:04 -07:00
Micah Lee
603be8a02c
Make web a module, so I can split it into multiple files
2018-09-20 23:31:52 -07:00
Micah Lee
81fa5e052c
Only add the download_filename to cleanup_filenames (which get deleted) if the file is zipped up. Otherwise, OnionShare deletes the original file
2018-09-20 23:18:17 -07:00
Micah Lee
324538bdd3
When there is only 1 file being shared, don't zip it
2018-09-20 09:14:56 -07:00
Miguel Jacq
997e2f87ee
Throw a 403 on the index pages if the timer has run out but an upload is in progress
2018-09-20 11:33:37 +10:00
Miguel Jacq
abb270834b
Log the public_mode flag as well
2018-09-19 14:53:33 +10:00
Miguel Jacq
f45eae5768
Fix syntax for opening explorer and selecting the filename. Fix a bug in the downloads_dir for Windows (need to use a backslash)
2018-09-19 12:12:18 +10:00
Miguel Jacq
62804dfdce
Merge pull request #758 from micahflee/665_cancel_compression
...
Fix zip progress bar not canceling problem
2018-09-19 10:59:11 +10:00
Micah Lee
6da5ae84f7
Tor version must actually be 0.3.3.1 for ephemeral v3 onion services
2018-09-18 17:31:40 -07:00
Micah Lee
cc265491fd
Properly handle exceptions in CLI, and pass the actual exception message in TorErrorProtocolError exceptions
2018-09-18 17:17:25 -07:00
Micah Lee
5448c4f345
Remove some debug logs
2018-09-18 16:58:16 -07:00
Micah Lee
0234ff5f37
Set self.cancel_compression to false in the set_file_info() function instead of Web's constructor, so it gets reset every time
2018-09-18 16:28:54 -07:00
Micah Lee
c52c846227
Make Web.set_file_info return False on cancel
2018-09-18 13:42:13 -07:00