Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
980dcf01
Commit
980dcf01
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Create a tor onion service for mesh peers if they are connected via ethernet
parent
7e23ab7b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-image-mesh
+5
-0
5 additions, 0 deletions
src/freedombone-image-mesh
src/freedombone-mesh-batman
+24
-0
24 additions, 0 deletions
src/freedombone-mesh-batman
with
29 additions
and
0 deletions
src/freedombone-image-mesh
+
5
−
0
View file @
980dcf01
...
...
@@ -990,6 +990,11 @@ if [ -f $MESH_INSTALL_SETUP ]; then
rm
-rf
/etc/openvpn/easy-rsa/keys/
*
fi
# Remove hidden service
if
[
-d
/var/lib/tor/hidden_service_mesh
]
;
then
rm
-rf
/var/lib/tor/hidden_service_mesh
fi
# Remove any existing vpn client keys
if
[
-f
/home/
$MY_USERNAME
/vpn.tar.gz
]
;
then
rm
/home/
$MY_USERNAME
/vpn.tar.gz
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-mesh-batman
+
24
−
0
View file @
980dcf01
...
...
@@ -416,6 +416,30 @@ function start {
fi
fi
# if we have an ethernet connection to an internet router then create
# an onion address for this peer
if
[[
"
$ethernet_connected
"
!=
"0"
]]
;
then
systemctl
enable
tor
systemctl start tor
HIDDEN_SERVICE_PATH
=
/var/lib/tor/hidden_service_
if
[
!
-f
${
HIDDEN_SERVICE_PATH
}
mesh/hostname
]
;
then
echo
"HiddenServiceDir
${
HIDDEN_SERVICE_PATH
}
mesh/"
>>
/etc/tor/torrc
echo
"HiddenServicePort 8008 127.0.0.1:8008"
>>
/etc/tor/torrc
echo
"HiddenServicePort 8010 127.0.0.1:8010"
>>
/etc/tor/torrc
echo
"HiddenServicePort
${
TOX_PORT
}
127.0.0.1:
${
TOX_PORT
}
"
>>
/etc/tor/torrc
echo
"HiddenServicePort
${
IPFS_PORT
}
127.0.0.1:
${
IPFS_PORT
}
"
>>
/etc/tor/torrc
echo
"HiddenServicePort
${
ZERONET_PORT
}
127.0.0.1:
${
ZERONET_PORT
}
"
>>
/etc/tor/torrc
echo
"HiddenServicePort 5353 127.0.0.1:5353"
>>
/etc/tor/torrc
echo
"HiddenServicePort 5354 127.0.0.1:5354"
>>
/etc/tor/torrc
echo
"HiddenServicePort 548 127.0.0.1:548"
>>
/etc/tor/torrc
echo
"HiddenServiceAuthorizeClient stealth mesh"
>>
/etc/tor/torrc
systemctl restart tor
fi
else
systemctl stop tor
systemctl disable tor
fi
verify
}
...
...
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