-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move iOS instructions away until ready
- Loading branch information
Showing
4 changed files
with
132 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
CAUTION: Neither of these are fully functional, they are most of the way there. | ||
|
||
.Non-jailbroken *iOS and iPadOS*; SSH method. | ||
[%collapsible] | ||
==== | ||
. Install https://apps.apple.com/us/app/ish-shell/id1436902243[iSH] and https://apps.apple.com/us/app/localsend/id1661733229[LocalSend]. | ||
- LocalSend is so you can send files to macOS or other OSes; AirDrop will not work on macOS while hosting Wi-Fi. | ||
|
||
. Install https://localsend.org/#/download[LocalSend] onto the device you are sharing a hotspot to. | ||
|
||
. Open iSH, then run `iOS/install_ssh.sh` | ||
- When prompted for a "file in which to save the key", keep pressing kbd:[Return] until completed. | ||
|
||
.Run in -d (debug mode) to close on any errors. | ||
. `/usr/sbin/sshd -d` | ||
|
||
.macOS | ||
|
||
. Make sure you don't have any Filters & Proxies already inside "Settings -> Network". | ||
. Open Terminal. | ||
. `ssh-keygen -t ed25519` | ||
- When prompted for a "file in which to save the key", keep pressing kbd:[Return] until completed. | ||
|
||
. `cat ~/.ssh/id_ed25519.pub | base64 | base64 -d > ~/publickey | pbcopy` | ||
- This will copy the result to the clipboard; the clipboard is synced between Apple devices. | ||
|
||
. On the iPhone or iPad: `nano ~/.ssh/authorized_keys`, then paste the clipboard, and save the file. | ||
|
||
. `chmod -R 700 /Users/admin/.ssh` | ||
|
||
. `pip3 install rsp` | ||
|
||
==== | ||
.Non-jailbroken *iOS and iPadOS*; SSL method. | ||
[%collapsible] | ||
==== | ||
|
||
. Install https://apps.apple.com/us/app/ish-shell/id1436902243[iSH] and https://apps.apple.com/us/app/localsend/id1661733229[LocalSend]. | ||
- LocalSend is so you can send files to macOS or other OSes; AirDrop will not work on macOS while hosting Wi-Fi. | ||
|
||
. Install https://localsend.org/#/download[LocalSend] onto the device you are sharing a hotspot to. | ||
|
||
. Open iSH, then run: `iOS/install_ssl` | ||
- When prompted for a Country Name, keep pressing kbd:[Return] until completed. | ||
|
||
.macOS | ||
. `openssl s_client -showcerts -servername server -connect 192.168.2.2:9080 > RootCACert.pem` | ||
. Open Keychain Access. | ||
. Drag the Root CA certificate into Keychain Access, and fully trust it. | ||
|
||
``` | ||
foreground = yes | ||
pid = /tmp/stunnel4.pid | ||
client = yes | ||
debug = 6 | ||
|
||
[hotspot client] | ||
client = yes | ||
accept = localhost:9080 | ||
connect = 192.168.2.2:4540 | ||
PSKsecrets = psk.txt | ||
``` | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
apk update | ||
apk upgrade | ||
apk add openssh | ||
ssh-keygen -t ed25519 | ||
mv ~/.ssh/id_ed25519 /etc/ssh/ssh_host_ed25519_key | ||
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys | ||
chmod 700 -R ~/.ssh | ||
chmod 600 ~/.ssh/authorized_keys | ||
cp ~/.ssh/id_ed25519.pub ~/client.pub | ||
# Grant permissions for 'root' to be used for sshd. | ||
sed -i s/root:!/"root:*"/g /etc/shadow | ||
|
||
echo -n " | ||
AuthorizedKeysFile /root/.ssh/authorized_keys | ||
Compression no # x86 emulation incurs heavy CPU usage, don't add onto that | ||
GatewayPorts yes # Allow local port forwarding | ||
ListenAddress 0.0.0.0 # Use local IP | ||
PasswordAuthentication no | ||
PermitRootLogin without-password | ||
PermitTunnel yes # Allow reverse tunneling | ||
Port 43188 # Custom port, 22 won't work | ||
PubkeyAuthentication yes # Allow SSH public key auth | ||
UseDNS no # Do DNS resolving on the client instead | ||
" > /etc/ssh/sshd_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
apk update | ||
apk upgrade | ||
apk add openssl stunnel | ||
mkdir -p /run/stunnel | ||
openssl genrsa -out ~/RootCAKey.pem 2048 | ||
openssl req -x509 -sha256 -new -nodes -key ~/RootCAKey.pem -days 3650 -out RootCACert.pem | ||
chmod 600 {~/RootCAKey.pem,~/RootCACert.pem} | ||
|
||
echo -n " | ||
cert = /root/RootCACert.pem | ||
key = /root/RootCAKey.pem | ||
# stunnel's SOCKS5 is encapsulated in TCP; act closer to UDP with TCP_NODELAY=1. | ||
socket = l:TCP_NODELAY=1 | ||
socket = r:TCP_NODELAY=1 | ||
# If stunnel works, set to: no | ||
foreground = yes | ||
# Expect that DNS resolving won't be immediate, due to mobile internet drop-outs. | ||
delay = yes | ||
[hotspot server] | ||
accept = localhost:4540 | ||
protocol = socks | ||
PSKsecrets = /root/psk.txt | ||
" > /etc/stunnel/stunnel.conf |