mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Snap successfully builds meek-client, and WIP getting tor to connect
This commit is contained in:
parent
0f63c89a59
commit
f09bb66425
@ -354,6 +354,11 @@ class Onion(object):
|
|||||||
f.write("\nUseBridges 1\n")
|
f.write("\nUseBridges 1\n")
|
||||||
|
|
||||||
# Execute a tor subprocess
|
# Execute a tor subprocess
|
||||||
|
self.common.log(
|
||||||
|
"Onion",
|
||||||
|
"connect",
|
||||||
|
f"starting {self.tor_path} subprocess",
|
||||||
|
)
|
||||||
start_ts = time.time()
|
start_ts = time.time()
|
||||||
if self.common.platform == "Windows":
|
if self.common.platform == "Windows":
|
||||||
# In Windows, hide console window when opening tor.exe subprocess
|
# In Windows, hide console window when opening tor.exe subprocess
|
||||||
@ -374,22 +379,29 @@ class Onion(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Wait for the tor controller to start
|
# Wait for the tor controller to start
|
||||||
|
self.common.log(
|
||||||
|
"Onion",
|
||||||
|
"connect",
|
||||||
|
f"tor pid: {self.tor_proc.pid}",
|
||||||
|
)
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
# Connect to the controller
|
# Connect to the controller
|
||||||
try:
|
self.common.log(
|
||||||
if (
|
"Onion",
|
||||||
self.common.platform == "Windows"
|
"connect",
|
||||||
or self.common.platform == "Darwin"
|
"authenticating to tor controller",
|
||||||
):
|
)
|
||||||
self.c = Controller.from_port(port=self.tor_control_port)
|
# try:
|
||||||
self.c.authenticate()
|
if self.common.platform == "Windows" or self.common.platform == "Darwin":
|
||||||
else:
|
self.c = Controller.from_port(port=self.tor_control_port)
|
||||||
self.c = Controller.from_socket_file(path=self.tor_control_socket)
|
self.c.authenticate()
|
||||||
self.c.authenticate()
|
else:
|
||||||
except Exception as e:
|
self.c = Controller.from_socket_file(path=self.tor_control_socket)
|
||||||
print("OnionShare could not connect to Tor:\n{}".format(e.args[0]))
|
self.c.authenticate()
|
||||||
raise BundledTorBroken(e.args[0])
|
# except Exception as e:
|
||||||
|
# print("OnionShare could not connect to Tor:\n{}".format(e))
|
||||||
|
# raise BundledTorBroken(e.args[0])
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
@ -412,7 +412,7 @@ class GuiCommon:
|
|||||||
def get_tor_paths(self):
|
def get_tor_paths(self):
|
||||||
if self.common.platform == "Linux":
|
if self.common.platform == "Linux":
|
||||||
base_path = self.get_resource_path("tor")
|
base_path = self.get_resource_path("tor")
|
||||||
if base_path:
|
if base_path and os.path.isdir(base_path):
|
||||||
self.common.log(
|
self.common.log(
|
||||||
"GuiCommon", "get_tor_paths", "using paths in resources"
|
"GuiCommon", "get_tor_paths", "using paths in resources"
|
||||||
)
|
)
|
||||||
|
@ -15,6 +15,7 @@ apps:
|
|||||||
onionshare:
|
onionshare:
|
||||||
common-id: org.onionshare.OnionShare
|
common-id: org.onionshare.OnionShare
|
||||||
command: onionshare
|
command: onionshare
|
||||||
|
extensions: [ gnome-3-34 ]
|
||||||
plugs:
|
plugs:
|
||||||
- desktop
|
- desktop
|
||||||
- home
|
- home
|
||||||
@ -125,7 +126,7 @@ parts:
|
|||||||
- setuptools
|
- setuptools
|
||||||
- pynacl
|
- pynacl
|
||||||
- colorama
|
- colorama
|
||||||
- git+https://github.com/onionshare/stem.git@1.8.1
|
- cepa == 1.8.3
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
@ -135,7 +136,7 @@ parts:
|
|||||||
stage:
|
stage:
|
||||||
- -usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
|
- -usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
|
||||||
- -usr/share/doc/libssl1.1/changelog.Debian.gz
|
- -usr/share/doc/libssl1.1/changelog.Debian.gz
|
||||||
after: [tor, obfs4, snowflake-client]
|
after: [tor, obfs4, snowflake-client, meek-client]
|
||||||
|
|
||||||
tor:
|
tor:
|
||||||
source: https://dist.torproject.org/tor-0.4.6.8.tar.gz
|
source: https://dist.torproject.org/tor-0.4.6.8.tar.gz
|
||||||
@ -165,11 +166,17 @@ parts:
|
|||||||
source: https://git.torproject.org/pluggable-transports/snowflake.git
|
source: https://git.torproject.org/pluggable-transports/snowflake.git
|
||||||
source-type: git
|
source-type: git
|
||||||
source-tag: v2.0.1
|
source-tag: v2.0.1
|
||||||
|
organize:
|
||||||
|
bin/client: bin/snowflake-client
|
||||||
|
|
||||||
# meek-client:
|
meek-client:
|
||||||
# plugin: go
|
plugin: go
|
||||||
# go-importpath: git.torproject.org/pluggable-transports/meek.git/meek-client
|
go-channel: stable
|
||||||
# go-packages: ["google.golang.org/appengine"]
|
go-importpath: git.torproject.org/pluggable-transports/meek.git/meek-client
|
||||||
# source: https://git.torproject.org/pluggable-transports/meek.git
|
# Not sure why I have to do this, but it works
|
||||||
# source-type: git
|
override-build: |
|
||||||
# source-tag: v0.37.0
|
cd meek-client
|
||||||
|
go build -o /root/parts/meek-client/install/bin ./...
|
||||||
|
source: https://git.torproject.org/pluggable-transports/meek.git
|
||||||
|
source-type: git
|
||||||
|
source-tag: v0.37.0
|
||||||
|
Loading…
Reference in New Issue
Block a user