Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Onion Wrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Onion Wrapper
Commits
f60edcd3
Verified
Commit
f60edcd3
authored
1 year ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Delete tor binaries instead of just overwriting them
parent
07c10717
No related branches found
No related tags found
1 merge request
!2
Add support for macOS
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
onionwrapper-core/src/main/java/org/briarproject/onionwrapper/AbstractTorWrapper.java
+10
-0
10 additions, 0 deletions
...ava/org/briarproject/onionwrapper/AbstractTorWrapper.java
with
10 additions
and
0 deletions
onionwrapper-core/src/main/java/org/briarproject/onionwrapper/AbstractTorWrapper.java
+
10
−
0
View file @
f60edcd3
...
...
@@ -229,6 +229,10 @@ abstract class AbstractTorWrapper implements EventHandler, TorWrapper {
LOG
.
info
(
"Installing Tor binary for "
+
architecture
);
}
File
torFile
=
getTorExecutableFile
();
// Important: delete file here and with other binaries below to prevent
// problems on macOS in case the file signature changed.
//noinspection ResultOfMethodCallIgnored
torFile
.
delete
();
extract
(
getExecutableInputStream
(
"tor"
),
torFile
);
if
(!
torFile
.
setExecutable
(
true
,
true
))
throw
new
IOException
();
}
...
...
@@ -238,6 +242,8 @@ abstract class AbstractTorWrapper implements EventHandler, TorWrapper {
LOG
.
info
(
"Installing libevent binary for "
+
architecture
);
}
File
libEventFile
=
getLibEventFile
();
//noinspection ResultOfMethodCallIgnored
libEventFile
.
delete
();
extract
(
getExecutableInputStream
(
"libevent-2.1.7.dylib"
),
libEventFile
);
}
...
...
@@ -246,6 +252,8 @@ abstract class AbstractTorWrapper implements EventHandler, TorWrapper {
LOG
.
info
(
"Installing obfs4proxy binary for "
+
architecture
);
}
File
obfs4File
=
getObfs4ExecutableFile
();
//noinspection ResultOfMethodCallIgnored
obfs4File
.
delete
();
extract
(
getExecutableInputStream
(
"obfs4proxy"
),
obfs4File
);
if
(!
obfs4File
.
setExecutable
(
true
,
true
))
throw
new
IOException
();
}
...
...
@@ -255,6 +263,8 @@ abstract class AbstractTorWrapper implements EventHandler, TorWrapper {
LOG
.
info
(
"Installing snowflake binary for "
+
architecture
);
}
File
snowflakeFile
=
getSnowflakeExecutableFile
();
//noinspection ResultOfMethodCallIgnored
snowflakeFile
.
delete
();
extract
(
getExecutableInputStream
(
"snowflake"
),
snowflakeFile
);
if
(!
snowflakeFile
.
setExecutable
(
true
,
true
))
throw
new
IOException
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment