Commit Graph

220 Commits

Author SHA1 Message Date
neon443
88b39363b2 version bump
remove @mainactors
set env vars
use sshoptionsset to set a username
disconnect sends an eof and handles the channel clsoing, for some reason it crashes on disconnect tho
do catch for pubkeyauth
added asyncReadFromChannel
remove weak self
condense guards
disconnect on a eof reccieve
reduce time sleeping
2025-06-23 18:14:08 +01:00
neon443
31beda2124 fix test connection button
increase buffer to 512 bytes
made it a blocking read because its happening on a bg thread anyways
using a cchar bitpattern for each string.utf8 when writing
its made no diff yet
increased sleep if nothing is returned
2025-06-23 13:41:20 +01:00
neon443
8df8c77c7a implemented actually using Host.publicKey and Host.privateKey to store pubkeys and privkeys
- this gives u icloud synced pub/privkeys
 - per host!!
made it load the key's string representation (if present) into the textboxes to tell the user that the key is there
made the privkey box a securefield to show .... instead of the key

added a handler.go() to handler disconnecting if connected and choosing password/pubkey auth
- really cleaned up the view code
added getPubkey(_: SecKey) to keychainmanager
added SSHErrors - commfail, connectionFail, backenderror
added AuthError - rejectedCreds, notconnected
added KeyError - importpub/privError, pub/priv rejected
made most functions throw in sshhandler
fix memoryLayoutsize(ofvalue to buffer.count in testexec
[weak self] in the async loop to prevent memory leaks i guess
added loccritical for easy red logging
2025-06-23 12:51:41 +01:00
neon443
c9eab9dde8 every fucking time i try rewriting that function 2025-06-23 11:33:32 +01:00
neon443
db76329f80 rewrote autwithpubkey to use emmeory strings
added strip pubkey and privkey functions to remove stuff like ssh-ed25519 and neon443@mac anc  -----begin key ----- end key etcc
2025-06-23 11:23:25 +01:00
neon443
01d569a859 mainacotr for sshhandler
added a cleanup to run after 10s clearing memory for keys and files
remove timer code
remove write(1 to stop console echo
open links
image -> systemImage
2025-06-23 10:19:49 +01:00
neon443
ea857a8960 fix warnings 2025-06-23 09:44:33 +01:00
neon443
b691224e39 encryption compliance 2025-06-23 09:41:29 +01:00
neon443
721cea4246 version bump 2025-06-23 09:40:26 +01:00
neon443
aab1756b5a bump version
remove send Ax256
change powerplug.portrait to power
reduce time from 10_000 to 1_000
remove sending print
add shellview
2025-06-22 19:53:12 +01:00
neon443
71c8e3f891 YESSSSS
typing works
so basically it just stopped tryna read from the server once the server was silent for a sec
so then i removed the return and made it an optional if let and wait 10_000 us if nothing comes back
this is so goood

changed it to get 256 bytes from server
2025-06-22 19:32:42 +01:00
neon443
9338b46760 improved how the terminal is updated, now just async reads aytomatically and will js not do anything if nothing recieved
terminal also starts at the top and doesnt have th wierd scroll artifacting
2025-06-22 18:43:10 +01:00
neon443
b60e8f4eed can kinda type - it gets sent to teh server, but doesnt refres :skulk: 2025-06-22 16:24:21 +01:00
neon443
e156d63cf6 WORKS!!!!! PUBKEY ON IOS!!!!!!
no file import rn
2025-06-22 12:35:08 +01:00
neon443
1cf9518e0f remove terminal string
rewrote authWithPubkey() to not write files and take data direcytly
remove read loop (comment adding it)
readfromchannel returns string
using swifterm to do terminal emulation
2025-06-22 10:51:21 +01:00
neon443
ed1e7ab25d commiting atp
pressing write sends ls\n
terminal view gets sshhandler instead of js text
sumplify writetochannel, takes a string
implemented a terminalviewdelegate that some rason never gets to do anythoing
2025-06-21 17:07:28 +01:00
neon443
c33e22cd3d write to channel works!!!!!!!!!!!!!!!!!
removing the read funciton call fixed it
2025-06-21 12:58:43 +01:00
neon443
5fafc52913 added syntax highlighting - and a new runtime error :cry 2025-06-21 12:50:28 +01:00
neon443
cf5feaacc2 cleaned up crashes and stuff from the alert message not getting a value 2025-06-21 12:06:12 +01:00
neon443
59e3a9e296 Hostkey changed warning
rewrote hostkey cahnged checker
hostkeys sync as well, and the app syncs icloud on launch
2025-06-21 11:59:50 +01:00
neon443
d982d018b8 functions to get hosts and indexes matching input, and to update a host
added a hostkey checker - fatalerror rn
reordered ui in connection view to make more sense
added sections
moved connect button to toolbar, disconect is there too!
hostsview update
2025-06-21 11:03:30 +01:00
neon443
57c6b6005b v bump 2025-06-20 18:11:18 +01:00
neon443
690d7ff95a hostsview: add plus button
add more stuff to Host
prevent host from changin in debug
prettify the list - show uuid if no address set
save changes to Host when closing connectionView
fix connectionView button being disabled sometimes
use a different button to add a host instead of the toolbar one when its empty bc of ! unwrap crash
animations on adding/removing hosts
2025-06-20 15:33:01 +01:00
neon443
be37c4efb9 asdfjkhadsjkghkjaehgf 2025-06-20 14:43:50 +01:00
neon443
a06de0b4c4 hostsview - list of hosts
hostmanager for loading and saving hosts to defaults
host.debug/.blank as static vars
fix crash on disconnect by checking for connection in timer before checking if channel is open
keychain layer? to convert ed25519 to seckey and back for keychain storage
generate ed25519 via cryptokit
2025-06-20 13:40:20 +01:00
neon443
86dd316e33 added a keymanager and keymanagerview, can ontly generate 4096 rsa rn
uses seckey
2025-06-20 10:31:22 +01:00
neon443
5747fe5395 switch back to data - its just easier
need to do ui now
2025-06-20 09:28:39 +01:00
neon443
2e1c624bec just tried to revert to it being pastable textfields but nope it doesnt work
its bc its not base64 encoded
maybe try that after?
2025-06-19 17:38:54 +01:00
neon443
15615e76a4 YESS
ok mb before, but it fking works!!!!!
like i can login to my mac from sshshell come on
just need to figure out how to type and what to do with all the [0m]133;B[?25h[?2004h
2025-06-19 16:59:10 +01:00
neon443
73adfd8fc8 still fricking cooked sybau 2025-06-19 16:32:17 +01:00
neon443
d2e2aed7ea still not worling
just hangs when trying to open a shell
2025-06-19 16:28:12 +01:00
neon443
869de8a47b ok - progress!!
libssh can read the files saved!!
2025-06-19 13:06:31 +01:00
neon443
5b91e315a7 rewrote authwithpubkey - currently doesnt auth but it can save the pub/privkeys temporarily and import? testing rn 2025-06-19 13:00:18 +01:00
neon443
5fbc6ec447 try to write to channel
got automatic reading done
2025-06-16 14:39:10 +01:00
neon443
b4a9e9bb24 toolbar in teminal view
animation in contentview
withanimations in sshhandler
2025-06-16 13:57:46 +01:00
neon443
a9eeb55cf6 moved lots of logic into sshHandler
increased deployment target bc i cba rn
2025-06-16 13:50:13 +01:00
neon443
62eedee835 fixed it 2025-06-09 17:26:41 +01:00
neon443
d4e1660728 added a terminal
currently doesnt work
using runestone as the terminal
2025-06-09 17:25:05 +01:00
neon443
0b9287f2e7 undo 2025-06-09 14:25:04 +01:00
neon443
c3c25e9d7d change to a env var 2025-06-09 13:51:25 +01:00
neon443
73e31b26f2 cleaned up viewmodifier 2025-06-09 13:43:21 +01:00
neon443
9410774264 get authmethods still dont work :cry 2025-06-08 21:12:22 +01:00
neon443
89defb4ac7 okk.... so ssh_userauth_list always returns 0 2025-06-08 21:05:08 +01:00
neon443
ec10964c4b make getauthmethods acctually useful loll - still needs work
fix double content on 17.0+ in foregroundStylecolor
2025-06-08 21:03:07 +01:00
neon443
e440168a28 Wrote a Host Protocol for easy stroing of hosts
a debugHost for reusable root:root@localhost:2222
blankHost for - well - blank hosts
gonna add userdefaults
added iclodu entitlement
added viewmodifier: foregroundStyle if 17.0+ and foregroundColor for else
2025-06-08 20:54:49 +01:00
neon443
e786d31da9 YESS
now displays shell on screen!!
currently view only :cry but still
2025-06-07 21:18:30 +01:00
neon443
b395876156 trying runloop with dispatchqueue 2025-06-07 20:40:16 +01:00
neon443
1acae004ec update ci scripts 2025-06-07 19:30:40 +01:00
neon443
e3d2b4db41 mege 2025-06-07 19:27:22 +01:00
neon443
40ffdcf262 update CI script 2025-06-07 19:25:17 +01:00