Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Pseudo VPN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Qiyang Sun
Pseudo VPN
Commits
eebce0a0
Verified
Commit
eebce0a0
authored
7 months ago
by
Qiyang Sun
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
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
README.org
+31
-0
31 additions, 0 deletions
README.org
connect
+42
-0
42 additions, 0 deletions
connect
with
73 additions
and
0 deletions
README.org
0 → 100644
+
31
−
0
View file @
eebce0a0
#+title: Pseudo VPN -- Connect to University Network Using SSH + SOCKS
For UNIX only (Linux, macOS, BSD, etc.)
* Configure
Edit ~connect~ and set your University id.
* Run script
#+BEGIN_SRC sh
chmod 0755 connect
./connect
#+END_SRC
* Edit Settings
Either edit your browser's proxy settings or edit your operating system's
network settings.
For Firefox, go to Settings > General > Network Settings > Settings... > Manual
proxy configuration > SOCKS Host (~localhost~), Port (~2333~ or as in script) >
OK.
For macOS, go to System Settings > Wi-Fi (or your network interface) >
Details... > Proxies > SOCKS proxy > Server (~localhost~), Port (~2333~ or as in
script) > OK.
* Finish
To stop, use Ctrl-C to send SIGINT. The script will kill ssh.
This diff is collapsed.
Click to expand it.
connect
0 → 100755
+
42
−
0
View file @
eebce0a0
#!/bin/bash
############################
# CONFIGURATIONS
# local port
p
=
2333
# university id
sotonid
=
'abc1d23'
# host
dn
=
'uglogin.ecs.soton.ac.uk'
############################
printf
'\e[8;12;40t'
# 40x12 window
echo
-e
"
\0
33[44;37m"
# fancy colour
clear
echo
"+--------------------------------------+"
echo
"| |"
echo
"| Connecting to the University of |"
echo
"| Southampton network, local port
$p
|"
ssh
$sotonid
@
$dn
-D
$p
-N
&
pid
=
$!
echo
"| PID is
$pid
|"
echo
"| |"
echo
"| C-c to terminate |"
echo
"| |"
echo
"+--------------------------------------+"
cleanup
()
{
clear
echo
"+--------------------------------------+"
echo
"| |"
echo
"| Killing the ssh process (pid
$pid
) |"
echo
"| |"
kill
$pid
&&
echo
"| Success |"
||
echo
"| Error |"
echo
"| |"
echo
"+--------------------------------------+"
echo
echo
echo
}
trap
cleanup SIGINT
tail
-f
/dev/null
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