mirror of
https://github.com/onionshare/onionshare.git
synced 2025-03-11 00:19:26 -04:00
In CI, download Tor from for windows Tor Expert Bundle, and build meek, obfs4proxy, and snowflake ourselves
This commit is contained in:
parent
de4dbb54a0
commit
e184ca5d03
@ -90,15 +90,38 @@ jobs:
|
||||
cd ~\project\desktop
|
||||
poetry install
|
||||
- run:
|
||||
name: Get tor
|
||||
command: |
|
||||
cd ~\project\desktop
|
||||
poetry run python .\scripts\get-tor.py
|
||||
name: Download tor (Windows Expert Bundle)
|
||||
command: |
|
||||
mkdir ~\Downloads\tor
|
||||
cd ~\Downloads\tor
|
||||
$URL = "https://www.torproject.org/dist/torbrowser/11.0.10/tor-win32-0.4.6.10.zip"
|
||||
$Filename = "tor-win32-0.4.6.10.zip"
|
||||
$ExpectedHash = "d3f62317507dbe1a1aa74b9e0e03996dbded2143f94409270828f6a8bcdda16a"
|
||||
Invoke-WebRequest -Uri $URL -OutFile $Filename
|
||||
$FileHash = Get-FileHash $Filename
|
||||
if($FileHash.Hash -ne $ExpectedHash) {
|
||||
throw "Invalid hash"
|
||||
}
|
||||
Expand-Archive -LiteralPath tor-win32-0.4.6.10.zip -DestinationPath ~\project\desktop\onionshare\resources\tor
|
||||
- run:
|
||||
name: Build meek
|
||||
name: Build obfs4proxy
|
||||
command: |
|
||||
cd ~\project\desktop
|
||||
python .\scripts\build-meek-client.py
|
||||
mkdir ~\Downloads\obfs4proxy
|
||||
cd Downloads\obfs4proxy
|
||||
git clone https://gitlab.com/yawning/obfs4
|
||||
cd obfs4
|
||||
go build .\obfs4proxy
|
||||
Move-Item -Path .\obfs4proxy.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\obfs4proxy.exe
|
||||
- run:
|
||||
name: Build snowflake-client
|
||||
command: |
|
||||
go install git.torproject.org/pluggable-transports/snowflake.git/client@latest
|
||||
Move-Item -Path ~\go\bin\client.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\snowflake-client.exe
|
||||
- run:
|
||||
name: Build meek-client
|
||||
command: |
|
||||
go install git.torproject.org/pluggable-transports/meek.git/meek-client@v0.37.0
|
||||
Move-Item -Path ~\go\bin\meek-client.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\meek-client.exe
|
||||
- run:
|
||||
name: Build OnionShare
|
||||
command: |
|
||||
@ -138,10 +161,38 @@ jobs:
|
||||
cd ~\project\desktop
|
||||
C:\Python-32bit\Scripts\poetry install
|
||||
- run:
|
||||
name: Get tor
|
||||
name: Download tor (Windows Expert Bundle)
|
||||
command: |
|
||||
mkdir ~\Downloads\tor
|
||||
cd ~\Downloads\tor
|
||||
$URL = "https://www.torproject.org/dist/torbrowser/11.0.10/tor-win32-0.4.6.10.zip"
|
||||
$Filename = "tor-win32-0.4.6.10.zip"
|
||||
$ExpectedHash = "d3f62317507dbe1a1aa74b9e0e03996dbded2143f94409270828f6a8bcdda16a"
|
||||
Invoke-WebRequest -Uri $URL -OutFile $Filename
|
||||
$FileHash = Get-FileHash $Filename
|
||||
if($FileHash.Hash -ne $ExpectedHash) {
|
||||
throw "Invalid hash"
|
||||
}
|
||||
Expand-Archive -LiteralPath tor-win32-0.4.6.10.zip -DestinationPath ~\project\desktop\onionshare\resources\tor
|
||||
- run:
|
||||
name: Build obfs4proxy
|
||||
command: |
|
||||
cd ~\project\desktop
|
||||
C:\Python-32bit\Scripts\poetry run python .\scripts\get-tor.py
|
||||
mkdir ~\Downloads\obfs4proxy
|
||||
cd Downloads\obfs4proxy
|
||||
git clone https://gitlab.com/yawning/obfs4
|
||||
cd obfs4
|
||||
"C:\\Program Files (x86)\\Go\\bin\\go" build .\obfs4proxy
|
||||
Move-Item -Path .\obfs4proxy.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\obfs4proxy.exe
|
||||
- run:
|
||||
name: Build snowflake-client
|
||||
command: |
|
||||
"C:\\Program Files (x86)\\Go\\bin\\go" install git.torproject.org/pluggable-transports/snowflake.git/client@latest
|
||||
Move-Item -Path ~\go\bin\client.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\snowflake-client.exe
|
||||
- run:
|
||||
name: Build meek-client
|
||||
command: |
|
||||
"C:\\Program Files (x86)\\Go\\bin\\go" install git.torproject.org/pluggable-transports/meek.git/meek-client@v0.37.0
|
||||
Move-Item -Path ~\go\bin\meek-client.exe -Destination ~\project\desktop\onionshare\resources\tor\Tor\meek-client.exe
|
||||
- run:
|
||||
name: Build meek
|
||||
command: |
|
||||
|
@ -44,6 +44,7 @@ def run(cmd, cwd=None, error_ok=False):
|
||||
|
||||
|
||||
def sign(filename):
|
||||
click.echo(f"> Signing {filename}")
|
||||
run(
|
||||
[
|
||||
shutil.which("signtool"),
|
||||
@ -580,25 +581,41 @@ def codesign(win32_path, win64_path):
|
||||
return
|
||||
|
||||
for path in paths:
|
||||
bin_path = os.path.join(path, "onionshare.exe")
|
||||
click.echo(f"> Signing {bin_path}")
|
||||
sign(bin_path)
|
||||
|
||||
bin_path = os.path.join(path, "onionshare-cli.exe")
|
||||
click.echo(f"> Signing {bin_path}")
|
||||
sign(bin_path)
|
||||
|
||||
bin_path = os.path.join(
|
||||
path,
|
||||
"lib",
|
||||
"onionshare",
|
||||
"resources",
|
||||
"tor",
|
||||
"Tor",
|
||||
"meek-client.exe",
|
||||
sign(os.path.join(path, "onionshare.exe"))
|
||||
sign(os.path.join(path, "onionshare-cli.exe"))
|
||||
sign(
|
||||
os.path.join(
|
||||
path,
|
||||
"lib",
|
||||
"onionshare",
|
||||
"resources",
|
||||
"tor",
|
||||
"Tor",
|
||||
"meek-client.exe",
|
||||
)
|
||||
)
|
||||
sign(
|
||||
os.path.join(
|
||||
path,
|
||||
"lib",
|
||||
"onionshare",
|
||||
"resources",
|
||||
"tor",
|
||||
"Tor",
|
||||
"obfs4proxy.exe",
|
||||
)
|
||||
)
|
||||
sign(
|
||||
os.path.join(
|
||||
path,
|
||||
"lib",
|
||||
"onionshare",
|
||||
"resources",
|
||||
"tor",
|
||||
"Tor",
|
||||
"snowflake-client.exe",
|
||||
)
|
||||
)
|
||||
click.echo(f"> Signing {bin_path}")
|
||||
sign(bin_path)
|
||||
|
||||
|
||||
@main.command()
|
||||
|
Loading…
x
Reference in New Issue
Block a user