Completed merge

This commit is contained in:
NoisyCoil 2022-12-30 19:55:47 +01:00
commit e3613c39fe
29 changed files with 132 additions and 179 deletions

View file

@ -244,17 +244,6 @@ class MainWindow(QtWidgets.QMainWindow):
break
self.tabs.open_settings_tab(from_autoconnect, active_tab=active_tab)
def settings_have_changed(self):
self.common.log("OnionShareGui", "settings_have_changed")
if self.common.gui.onion.is_authenticated():
self.status_bar.clearMessage()
# Tell each tab that settings have changed
for index in range(self.tabs.count()):
tab = self.tabs.widget(index)
tab.settings_have_changed()
def bring_to_front(self):
self.common.log("MainWindow", "bring_to_front")
self.raise_()

View file

@ -315,10 +315,6 @@ class SettingsTab(QtWidgets.QWidget):
return settings
def settings_have_changed(self):
# Global settings have changed
self.common.log("SettingsTab", "settings_have_changed")
def _update_autoupdate_timestamp(self, autoupdate_timestamp):
self.common.log("SettingsTab", "_update_autoupdate_timestamp")

View file

@ -564,6 +564,8 @@ class Mode(QtWidgets.QWidget):
self.content_widget.show()
self.tor_not_connected_widget.hide()
self.primary_action.show()
if not self.tab.timer.isActive():
self.tab.timer.start(500)
def tor_connection_stopped(self):
"""

View file

@ -149,11 +149,5 @@ class ChatMode(Mode):
"""
self.primary_action.hide()
def on_reload_settings(self):
"""
We should be ok to re-enable the 'Start Receive Mode' button now.
"""
self.primary_action.show()
def update_primary_action(self):
self.common.log("ChatMode", "update_primary_action")

View file

@ -409,12 +409,6 @@ class ReceiveMode(Mode):
self.history.in_progress_count -= 1
self.history.update_in_progress()
def on_reload_settings(self):
"""
We should be ok to re-enable the 'Start Receive Mode' button now.
"""
self.primary_action.show()
def reset_info_counters(self):
"""
Set the info counters back to zero.

View file

@ -362,16 +362,6 @@ class ShareMode(Mode):
strings._("systray_share_canceled_message"),
)
def on_reload_settings(self):
"""
If there were some files listed for sharing, we should be ok to re-enable
the 'Start Sharing' button now.
"""
if self.server_status.file_selection.get_num_files() > 0:
self.primary_action.show()
self.info_label.show()
self.remove_all_button.show()
def update_primary_action(self):
self.common.log("ShareMode", "update_primary_action")

View file

@ -317,16 +317,6 @@ class WebsiteMode(Mode):
"""
self.primary_action.hide()
def on_reload_settings(self):
"""
If there were some files listed for sharing, we should be ok to re-enable
the 'Start Sharing' button now.
"""
if self.server_status.file_selection.get_num_files() > 0:
self.primary_action.show()
self.info_label.show()
self.remove_all_button.show()
def update_primary_action(self):
self.common.log("WebsiteMode", "update_primary_action")

View file

@ -630,20 +630,6 @@ class Tab(QtWidgets.QWidget):
else:
return None
def settings_have_changed(self):
# Global settings have changed
self.common.log("Tab", "settings_have_changed")
# We might've stopped the main requests timer if a Tor connection failed. If we've reloaded
# settings, we probably succeeded in obtaining a new connection. If so, restart the timer.
if not self.common.gui.local_only:
if self.common.gui.onion.is_authenticated():
mode = self.get_mode()
if mode:
if not self.timer.isActive():
self.timer.start(500)
mode.on_reload_settings()
def close_tab(self):
self.common.log("Tab", "close_tab")
if self.mode is None:

View file

@ -903,7 +903,3 @@ class TorSettingsTab(QtWidgets.QWidget):
# Wait 1ms for the event loop to finish, then quit
QtCore.QTimer.singleShot(1, self.common.gui.qtapp.quit)
def settings_have_changed(self):
# Global settings have changed
self.common.log("TorSettingsTab", "settings_have_changed")

View file

@ -24,6 +24,6 @@
<update_contact>micah@micahflee.com</update_contact>
<content_rating type="oars-1.1" />
<releases>
<release type="development" date="2022-10-09" version="2.6" />
<release type="development" date="2022-10-18" version="2.6.1" />
</releases>
</component>

53
desktop/poetry.lock generated
View file

@ -45,7 +45,7 @@ uvloop = ["uvloop (>=0.15.2)"]
[[package]]
name = "certifi"
version = "2022.9.24"
version = "2022.12.7"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
@ -151,6 +151,17 @@ dnspython = ">=1.15.0"
greenlet = ">=0.3"
six = ">=1.10.0"
[[package]]
name = "exceptiongroup"
version = "1.0.4"
description = "Backport of PEP 654 (exception groups)"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.extras]
test = ["pytest (>=6)"]
[[package]]
name = "Flask"
version = "2.0.3"
@ -306,7 +317,7 @@ python-versions = "*"
[[package]]
name = "onionshare-cli"
version = "2.6"
version = "2.6.1"
description = "OnionShare lets you securely and anonymously send and receive files. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable web address so others can download files from you, or upload files to you. It does _not_ require setting up a separate server or using a third party file-sharing service."
category = "main"
optional = false
@ -402,14 +413,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[package.extras]
test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"]
[[package]]
name = "py"
version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pycparser"
version = "2.21"
@ -490,7 +493,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "pytest"
version = "7.1.3"
version = "7.2.0"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
@ -499,12 +502,12 @@ python-versions = ">=3.7"
[package.dependencies]
attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
py = ">=1.8.2"
tomli = ">=1.0.0"
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
[package.extras]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
@ -522,7 +525,7 @@ pytest = ">=5.0"
[[package]]
name = "pytest-qt"
version = "4.1.0"
version = "4.2.0"
description = "pytest support for PyQt and PySide applications"
category = "dev"
optional = false
@ -739,7 +742,7 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"]
[metadata]
lock-version = "1.1"
python-versions = ">=3.7,<3.11"
content-hash = "d6ad676f3ecea349558ed78d2a764826a485adab6f6535818553666b580c2367"
content-hash = "074ec9d83cff69188cad191ec42d1ac60a4f3a12beda367e4bb0e95f4d06fcb1"
[metadata.files]
attrs = [
@ -774,8 +777,8 @@ black = [
{file = "black-22.10.0.tar.gz", hash = "sha256:f513588da599943e0cde4e32cc9879e825d58720d6557062d1098c5ad80080e1"},
]
certifi = [
{file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"},
{file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"},
{file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"},
{file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"},
]
cffi = [
{file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"},
@ -905,6 +908,10 @@ eventlet = [
{file = "eventlet-0.33.1-py2.py3-none-any.whl", hash = "sha256:a085922698e5029f820cf311a648ac324d73cec0e4792877609d978a4b5bbf31"},
{file = "eventlet-0.33.1.tar.gz", hash = "sha256:afbe17f06a58491e9aebd7a4a03e70b0b63fd4cf76d8307bae07f280479b1515"},
]
exceptiongroup = [
{file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
{file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
]
Flask = [
{file = "Flask-2.0.3-py3-none-any.whl", hash = "sha256:59da8a3170004800a2837844bfa84d49b022550616070f7cb1a659682b2e7c9f"},
{file = "Flask-2.0.3.tar.gz", hash = "sha256:e1120c228ca2f553b470df4a5fa927ab66258467526069981b3eb0a91902687d"},
@ -1159,10 +1166,6 @@ psutil = [
{file = "psutil-5.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:68b35cbff92d1f7103d8f1db77c977e72f49fcefae3d3d2b91c76b0e7aef48b8"},
{file = "psutil-5.9.2.tar.gz", hash = "sha256:feb861a10b6c3bb00701063b37e4afc754f8217f0f09c42280586bd6ac712b5c"},
]
py = [
{file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
{file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
]
pycparser = [
{file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"},
{file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"},
@ -1213,16 +1216,16 @@ PySocks = [
{file = "PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"},
]
pytest = [
{file = "pytest-7.1.3-py3-none-any.whl", hash = "sha256:1377bda3466d70b55e3f5cecfa55bb7cfcf219c7964629b967c37cf0bda818b7"},
{file = "pytest-7.1.3.tar.gz", hash = "sha256:4f365fec2dff9c1162f834d9f18af1ba13062db0c708bf7b946f8a5c76180c39"},
{file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
{file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
]
pytest-faulthandler = [
{file = "pytest-faulthandler-2.0.1.tar.gz", hash = "sha256:ed72bbce87ac344da81eb7d882196a457d4a1026a3da4a57154dacd85cd71ae5"},
{file = "pytest_faulthandler-2.0.1-py2.py3-none-any.whl", hash = "sha256:236430ba962fd1c910d670922be55fe5b25ea9bc3fc6561a0cafbb8759e7504d"},
]
pytest-qt = [
{file = "pytest-qt-4.1.0.tar.gz", hash = "sha256:027f3d3f5dd04af0530d846cf50fb858f719f7e87c2e4a1c686abd4e0f72172a"},
{file = "pytest_qt-4.1.0-py2.py3-none-any.whl", hash = "sha256:edd08dae3b207405edddfc482d4dda4b848e85a8e6a0e7c36f20bac11ab328de"},
{file = "pytest-qt-4.2.0.tar.gz", hash = "sha256:00a17b586dd530b6d7a9399923a40489ca4a9a309719011175f55dc6b5dc8f41"},
{file = "pytest_qt-4.2.0-py2.py3-none-any.whl", hash = "sha256:a7659960a1ab2af8fc944655a157ff45d714b80ed7a6af96a4b5bb99ecf40a22"},
]
python-engineio = [
{file = "python-engineio-4.3.4.tar.gz", hash = "sha256:d8d8b072799c36cadcdcc2b40d2a560ce09797ab3d2d596b2ad519a5e4df19ae"},

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "onionshare"
version = "2.6"
version = "2.6.1"
description = "OnionShare lets you securely and anonymously send and receive files. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable web address so others can download files from you, or upload files to you. It does _not_ require setting up a separate server or using a third party file-sharing service."
authors = ["Micah Lee <micah@micahflee.com>"]
license = "GPLv3+"
@ -15,9 +15,9 @@ pyside6 = "^6.4.0"
[tool.poetry.dev-dependencies]
click = "*"
black = "*"
pytest = "*"
pytest = ">=7.2.0"
pytest-faulthandler = "*"
pytest-qt = "*"
pytest-qt = ">=4.2.0"
cx_freeze = "*"
importlib-metadata = "*"

View file

@ -1,4 +1,4 @@
$env:OBFS4PROXY_TAG = 'obfs4proxy-0.0.13'
$env:OBFS4PROXY_TAG = 'obfs4proxy-0.0.14'
New-Item -ItemType Directory -Force -Path .\build\obfs4proxy
cd .\build\obfs4proxy

View file

@ -1,9 +1,9 @@
#!/bin/bash
OBFS4PROXY_TAG=obfs4proxy-0.0.13
OBFS4PROXY_TAG=obfs4proxy-0.0.14
mkdir -p ./build/obfs4proxy
cd ./build/obfs4proxy
git clone https://gitlab.com/yawning/obfs4 || echo "already cloned"
cd obfs4
git checkout $OBFS4PROXY_TAG
go build -o ../../../onionshare/resources/tor/obfs4proxy ./obfs4proxy
go build -o ../../../onionshare/resources/tor/obfs4proxy ./obfs4proxy

View file

@ -1,4 +1,4 @@
$env:SNOWFLAKE_TAG = 'v2.2.0'
$env:SNOWFLAKE_TAG = 'v2.3.1'
New-Item -ItemType Directory -Force -Path .\build\snowflake
cd .\build\snowflake

View file

@ -1,5 +1,5 @@
#!/bin/bash
SNOWFLAKE_TAG=v2.2.0
SNOWFLAKE_TAG=v2.3.1
mkdir -p ./build/snowflake
cd ./build/snowflake

View file

@ -9,28 +9,28 @@ import subprocess
import requests
import click
torbrowser_version = "11.5.2"
torbrowser_version = "12.0"
expected_win32_sha256 = (
"07e721ae76bc7eefe25f20792091009238e9568d500331fc64bdd8796fec8c0f"
"a9cc0f0af2ce8ca0d7a27d65c7efa37f6419cfc793fa80371e7db73d44b4cc02"
)
expected_win64_sha256 = (
"8237bca22b5fa545de21f84ba8c9270c84442d0fc50a2e626f757d069e4bc7a8"
"f496cc0219c8b73f1f100124d6514bad55f503ff76202747f23620a6677e83c2"
)
expected_macos_sha256 = (
"b80d3dba83b343fab7a6c8fc08440b2751da1ac12f86fe593da8e74069e4d7f6"
"11c8360187356e6c0837612a320f1a117303fc449602c9fd73f4faf9f9bbcfc9"
)
expected_linux64_sha256 = (
"90cdce3854e9114ee7232aaa74672a2d9f3a40b6fa8ac33971f586ee3a3cf75a"
"850ce601d815bac63e4f5937646d2b497173be28b27b30a7526ebb946a459874"
)
win32_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/torbrowser-install-{torbrowser_version}_en-US.exe"
win32_filename = f"torbrowser-install-{torbrowser_version}_en-US.exe"
win64_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/torbrowser-install-win64-{torbrowser_version}_en-US.exe"
win64_filename = f"torbrowser-install-win64-{torbrowser_version}_en-US.exe"
macos_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/TorBrowser-{torbrowser_version}-osx64_en-US.dmg"
macos_filename = f"TorBrowser-{torbrowser_version}-osx64_en-US.dmg"
linux64_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/tor-browser-linux64-{torbrowser_version}_en-US.tar.xz"
linux64_filename = f"tor-browser-linux64-{torbrowser_version}_en-US.tar.xz"
win32_filename = f"torbrowser-install-{torbrowser_version}_ALL.exe"
win32_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/{win32_filename}"
win64_filename = f"torbrowser-install-win64-{torbrowser_version}_ALL.exe"
win64_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/{win64_filename}"
macos_filename = f"TorBrowser-{torbrowser_version}-macos_ALL.dmg"
macos_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/{macos_filename}"
linux64_filename = f"tor-browser-linux64-{torbrowser_version}_ALL.tar.xz"
linux64_url = f"https://dist.torproject.org/torbrowser/{torbrowser_version}/{linux64_filename}"
# Common paths
@ -46,32 +46,14 @@ def get_tor_windows(platform):
win_filename = win32_filename
expected_win_sha256 = expected_win32_sha256
bin_filenames = [
"libcrypto-1_1.dll",
"libevent-2-1-7.dll",
"libevent_core-2-1-7.dll",
"libevent_extra-2-1-7.dll",
"libgcc_s_dw2-1.dll",
"libssl-1_1.dll",
"libssp-0.dll",
"libwinpthread-1.dll",
"tor.exe",
"zlib1.dll",
"tor.exe"
]
elif platform == "win64":
win_url = win64_url
win_filename = win64_filename
expected_win_sha256 = expected_win64_sha256
bin_filenames = [
"libcrypto-1_1-x64.dll",
"libevent-2-1-7.dll",
"libevent_core-2-1-7.dll",
"libevent_extra-2-1-7.dll",
"libgcc_s_seh-1.dll",
"libssl-1_1-x64.dll",
"libssp-0.dll",
"libwinpthread-1.dll",
"tor.exe",
"zlib1.dll",
"tor.exe"
]
else:
click.echo("invalid platform")

View file

@ -3,7 +3,7 @@
import setuptools
# The version must be hard-coded because Snapcraft won't have access to ../cli
version = "2.6"
version = "2.6.1"
setuptools.setup(
name="onionshare",