terminal added
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
test/
|
||||||
|
upload/
|
||||||
|
gotermix
|
||||||
@@ -1,6 +1,25 @@
|
|||||||
|
# Go web terminal
|
||||||
|
- it runs on https ( default is random ssl certifcate generated during start)
|
||||||
|
- you can turn off user account required to access it during startup
|
||||||
|
- default user account is `ivor` and pw `Silv3rSw0rd!`
|
||||||
|
|
||||||
# Set custom encryption password for the .json file during build
|
|
||||||
export GOTERMINAL_ENC="SoMeStRongPasSwoR2d"
|
## Usage:
|
||||||
go build -ldflags "-X main.fileEncKeyHex=${GOTERMINAL_ENC}" .
|
`./gotermix -addr <string>`
|
||||||
# or one-liner:
|
- listen address (default "127.0.0.1:5000")
|
||||||
go build -ldflags "-X main.fileEncKeyHex=$(openssl rand -hex 32)" .
|
`./gotermix -nopw`
|
||||||
|
- disable password authentication
|
||||||
|
`./gotermix -setlogin <string>`
|
||||||
|
- set login username (next arg is password) and restart the app.
|
||||||
|
`./gotermix -cert /etc/ssl/my.crt -certkey /etc/ssl/my.key`
|
||||||
|
-s et a cert (validates it first, then stores paths encrypted, exits)
|
||||||
|
`./gotermix -cert /etc/ssl/combined.pem`
|
||||||
|
- combined cert+key PEM file (omit -certkey)
|
||||||
|
`./gotermix -certreset`
|
||||||
|
- remove stored cert, revert to self-signed
|
||||||
|
|
||||||
|
## Set custom encryption password for the .json file during build
|
||||||
|
`export GOTERMINAL_ENC="SoMeStRongPasSwoR2d"`
|
||||||
|
`go build -ldflags "-X main.fileEncKeyHex=${GOTERMINAL_ENC}" .`
|
||||||
|
## or one-liner:
|
||||||
|
`go build -ldflags "-X main.fileEncKeyHex=$(openssl rand -hex 32)" .`
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
module gotermix
|
||||||
|
|
||||||
|
go 1.26.3
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/creack/pty v1.1.24
|
||||||
|
github.com/gorilla/websocket v1.5.3
|
||||||
|
)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
|
||||||
|
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
|
||||||
|
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||||
|
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
Reference in New Issue
Block a user