Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sshuttle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
sshuttle
Commits
d8754dc3
Commit
d8754dc3
authored
Jan 20, 2013
by
Jim Wyllie
Committed by
Brian May
Sep 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First version; still has debugging
parent
3956a5df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
sshuttle.conf
packaging/sshuttle.conf
+75
-0
No files found.
packaging/sshuttle.conf
0 → 100644
View file @
d8754dc3
description
"Create a tunnel over SSH proxy"
author
"Jim Wyllie <jwyllie83@gmail.com>"
manual
nice
-
5
# Edit this file with network prefixes that should be loaded through the SSH
# tunnel.
env
PREFIX_LOCATION
=/
etc
/
sshuttle
/
prefixes
.
conf
# Try all the keys in a given key directory
env
KEY_LOCATION
=/
etc
/
sshuttle
/
keys
# Routing table; defaults to 100
env
ROUTE_TABLE
=
100
# fwmark; defaults to 1
env
FWMARK
=
1
start
on
(
local
-
filesystems
and
net
-
device
-
up
IFACE
!=
lo
)
stop
on
stopping
network
-
services
#respawn
pre
-
start
script
# Make sure we have created the routes
sudo
ip
rule
add
fwmark
${
FWMARK
}
lookup
${
ROUTE_TABLE
}
logger
"Starting sshuttle..."
if
[ -
f
"${PREFIX_LOCATION}"
];
then
cat
"${PREFIX_LOCATION}"
|
while
read
ROUTE
;
do
logger
"Working on route: ${ROUTE}"
# Skip comments
if
[ -
n
"$(echo ${ROUTE} | egrep "
^[ ]*
#")" ]; then
continue
fi
# Skip empty lines
if
[ -
z
"${ROUTE}"
];
then
continue
fi
logger
"Adding route command: ip route add local ${ROUTE} dev lo table ${ROUTE_TABLE}"
ip
route
add
local
${
ROUTE
}
dev
lo
table
${
ROUTE_TABLE
}
done
fi
end
script
post
-
stop
script
if
[ -
f
"${PREFIX_LOCATION}"
];
then
cat
"${PREFIX_LOCATION}"
|
while
read
ROUTE
;
do
logger
"Working on route: ${ROUTE}"
# Skip comments
if
[ -
n
"$(echo ${ROUTE} | egrep "
^[ ]*
#")" ]; then
continue
fi
# Skip empty lines
if
[ -
z
"${ROUTE}"
];
then
continue
fi
logger
"Deleting route command: ip route del local ${ROUTE} dev lo table ${ROUTE_TABLE}"
ip
route
del
local
${
ROUTE
}
dev
lo
table
${
ROUTE_TABLE
}
done
fi
ip
rule
del
fwmark
${
FWMARK
}
end
script
exec
sleep
60
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment