Fixed many problems in README.md
This commit is contained in:
86
README.md
86
README.md
@@ -1,10 +1,10 @@
|
|||||||
# Sshwifty Web SSH Client
|
# Sshwifty Web SSH Client
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Sshwifty is a SSH client that provides a web interface. It can be deployed on
|
Sshwifty is a SSH client that provides a web interface. It can be deployed on
|
||||||
your computer or server, so you can access SSH servers via any device that have
|
your computer or server, so you can access SSH servers via any device with a
|
||||||
a compatible (standard) web browser.
|
compatible (standard) web browser.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -12,18 +12,18 @@ a compatible (standard) web browser.
|
|||||||
|
|
||||||
### Binary
|
### Binary
|
||||||
|
|
||||||
You can download compiled binaries at [Release] section of the page.
|
Compiled binaries can be found at the [release] section of the page.
|
||||||
|
|
||||||
Please noted that those binaries was generated by an automatic proccess, and the
|
Please be noted that those binaries was generated by an automatic proccess, and
|
||||||
author of this project will NOT verify them. You have to try it at your owk
|
the author of this project will NOT verify them. You have to try it at your owk
|
||||||
risk.
|
risk.
|
||||||
|
|
||||||
[release]: https://github.com/niruix/sshwifty/releases
|
[release]: https://github.com/niruix/sshwifty/releases
|
||||||
|
|
||||||
### Docker Image
|
### Docker Image
|
||||||
|
|
||||||
If you have [Docker] installed on your machine, you can directly use the Docker
|
If [Docker] is installed on your machine, then you can use our Docker image by
|
||||||
image by executing following command:
|
executing following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run --detach \
|
$ docker run --detach \
|
||||||
@@ -47,8 +47,9 @@ $ docker run --detach \
|
|||||||
niruix/sshwifty:latest
|
niruix/sshwifty:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
`/path/to/domain.crt` and `/path/to/domain.key` must be valid TLS certificate
|
`/path/to/domain.crt` and `/path/to/domain.key` must point to valid TLS
|
||||||
and key file located on the machine which the `docker run` command is executed.
|
certificate and key file located on the machine which the `docker run` command
|
||||||
|
is executed.
|
||||||
|
|
||||||
[Docker]: https://www.docker.com
|
[Docker]: https://www.docker.com
|
||||||
|
|
||||||
@@ -60,8 +61,8 @@ In order to use the source code, you need to install following tools:
|
|||||||
- `npm` to compile front-end application
|
- `npm` to compile front-end application
|
||||||
- `go` to compile back-end application
|
- `go` to compile back-end application
|
||||||
|
|
||||||
After you have installed those tools, run following command to download the code
|
After installing those tools, run following command to download the code to your
|
||||||
to your computer, and start the build proccess:
|
computer, and start the build proccess:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/niruix/sshwifty
|
$ git clone https://github.com/niruix/sshwifty
|
||||||
@@ -70,20 +71,21 @@ $ npm install
|
|||||||
$ npm run build
|
$ npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
If the command succeed, you will found the newly generated `sshwifty` binary
|
If succeed, you will found the newly generated `sshwifty` binary under current
|
||||||
under current working directory.
|
working directory.
|
||||||
|
|
||||||
### Deploy on the cloud
|
### Deploy on the cloud
|
||||||
|
|
||||||
To deploy this project onto the cloud, Google App Engine or Heroku for example,
|
To deploy this project onto the cloud, Google App Engine or Heroku for example,
|
||||||
you need to first download the source code, build it locally, then try to deploy
|
you need to first download the source code, then generate it locally before
|
||||||
it.
|
deploying it.
|
||||||
|
|
||||||
The `npm run generate` will generate all static files, then automatically call
|
`npm run generate` command will generate all static files and automatically
|
||||||
`go generate ./...` to bind those static files directly into program source
|
call `go generate ./...` to bind those static files directly into program source
|
||||||
code. You need those generated source code to get application to function. Also
|
code. You need those generated source code to get application to function.
|
||||||
because of this, directly call `go build .` on the newly downloaded souce code
|
|
||||||
will result a failure.
|
Trying to deploy ungenerated code directly to cloud will lead to failure, as
|
||||||
|
required source code is missing.
|
||||||
|
|
||||||
## Configure
|
## Configure
|
||||||
|
|
||||||
@@ -92,23 +94,23 @@ default, the configuration loader will try to load file from default paths
|
|||||||
first, then try environment variables.
|
first, then try environment variables.
|
||||||
|
|
||||||
You can also specify your own configuration file by setting `SSHWIFTY_CONFIG`
|
You can also specify your own configuration file by setting `SSHWIFTY_CONFIG`
|
||||||
environment variables. For example:
|
environment variable. For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ SSHWIFTY_CONFIG=./sshwifty.conf.json ./sshwifty
|
$ SSHWIFTY_CONFIG=./sshwifty.conf.json ./sshwifty
|
||||||
```
|
```
|
||||||
|
|
||||||
After that, Sshwifty will try to load the configuration from file
|
After that, Sshwifty will try to load the configuration from file
|
||||||
`./sshwifty.conf.json`, and never reach for configuration inside environment
|
`./sshwifty.conf.json`, and will never reach for other environment variables.
|
||||||
variables.
|
|
||||||
|
|
||||||
### Configuration file
|
### Configuration file
|
||||||
|
|
||||||
Here is the options that can be used in a configuration file and what it for:
|
Here is all the options of a configuration file:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
// HTTP Host. Keep it empty to accept request from all hosts
|
// HTTP Host. Keep it empty to accept request from all hosts, otherwise, only
|
||||||
|
// specified host is allowed to access
|
||||||
"HostName": "localhost",
|
"HostName": "localhost",
|
||||||
|
|
||||||
// Web interface access password. Set to empty to allow public access
|
// Web interface access password. Set to empty to allow public access
|
||||||
@@ -120,24 +122,24 @@ Here is the options that can be used in a configuration file and what it for:
|
|||||||
// (In Seconds)
|
// (In Seconds)
|
||||||
"DialTimeout": 10,
|
"DialTimeout": 10,
|
||||||
|
|
||||||
// Socks5 proxy. When set, we will try to connect remote through the given
|
// Socks5 proxy. When set, Sshwifty backend will try to connect remote through
|
||||||
// proxy
|
// the given proxy
|
||||||
"Socks5": "localhost:1080",
|
"Socks5": "localhost:1080",
|
||||||
|
|
||||||
// Username of the Socks5 server. Set when the Socks5 server requires login
|
// Username of the Socks5 server. Please set when needed
|
||||||
"Socks5User": "",
|
"Socks5User": "",
|
||||||
|
|
||||||
// Password of the Socks5 server. Set when the Socks5 server requires login
|
// Password of the Socks5 server. Please set when needed
|
||||||
"Socks5Password": "",
|
"Socks5Password": "",
|
||||||
|
|
||||||
// Sshwifty HTTP server, you can set multiple ones to serve on different
|
// Sshwifty HTTP server, you can set multiple ones to serve on different
|
||||||
// ports
|
// ports
|
||||||
"Servers": [
|
"Servers": [
|
||||||
{
|
{
|
||||||
// Which local interface this server will be listening
|
// Which local network interface this server will be listening
|
||||||
"ListenInterface": "0.0.0.0",
|
"ListenInterface": "0.0.0.0",
|
||||||
|
|
||||||
// Which local port this server will be listening
|
// Which local network port this server will be listening
|
||||||
"ListenPort": 8182,
|
"ListenPort": 8182,
|
||||||
|
|
||||||
// Timeout of initial request. HTTP handshake must be finished within
|
// Timeout of initial request. HTTP handshake must be finished within
|
||||||
@@ -145,8 +147,8 @@ Here is the options that can be used in a configuration file and what it for:
|
|||||||
// (In Seconds)
|
// (In Seconds)
|
||||||
"InitialTimeout": 3,
|
"InitialTimeout": 3,
|
||||||
|
|
||||||
// How long the connection can be idle before the server disconnects the
|
// How long do the connection can stay in idle before the backend server
|
||||||
// client
|
// disconnects the client
|
||||||
// (In Seconds)
|
// (In Seconds)
|
||||||
"ReadTimeout": 60,
|
"ReadTimeout": 60,
|
||||||
|
|
||||||
@@ -211,10 +213,10 @@ SSHWIFTY_TLSCERTIFICATEKEYFILE
|
|||||||
The option they represented is corresponded to their counterparts in the
|
The option they represented is corresponded to their counterparts in the
|
||||||
configuration file.
|
configuration file.
|
||||||
|
|
||||||
Notice: When you use environment variables to configure Sshwifty, only one
|
Notice: When you're using environment variables to configure Sshwifty, only one
|
||||||
Sshwifty HTTP server is then allowed. There is no way to setup mulitple servers
|
Sshwifty HTTP server is then allowed. There is no way to setup mulitple servers
|
||||||
by using this method. If you need to serve on multiple ports, use configuration
|
under this method of configure. If you need to serve on multiple ports, use
|
||||||
file instead.
|
configuration file instead.
|
||||||
|
|
||||||
Be aware: An invalid value inside following environment variables will cause
|
Be aware: An invalid value inside following environment variables will cause
|
||||||
the value to be sliently reset to default during configuration parsing phase
|
the value to be sliently reset to default during configuration parsing phase
|
||||||
@@ -245,13 +247,15 @@ license. See [DEPENDENCIES.md] for dependencies used by this project.
|
|||||||
This is a hobbyist project, meaning I don't have too many time to put into it.
|
This is a hobbyist project, meaning I don't have too many time to put into it.
|
||||||
|
|
||||||
Upon release (Which is then you're able to read this file), this project will
|
Upon release (Which is then you're able to read this file), this project will
|
||||||
enter maintaining state, which includes doing bug fix and security updates.
|
enter _maintaining_ state, which includes doing bug fix and security updates.
|
||||||
Adding new features however, is not a part of the state.
|
Adding new features however, is not a part of the state.
|
||||||
|
|
||||||
|
Please do not send pull request. If you need new feature, fork it, and maintain
|
||||||
|
it like one of your own project.
|
||||||
|
|
||||||
(Notice: Typo, grammar error or invalid use of language in the source code and
|
(Notice: Typo, grammar error or invalid use of language in the source code and
|
||||||
document is categorized as bug, please report them if you found any. Thank you!)
|
document is categorized as bug, please report them if you found any. Thank you!)
|
||||||
|
|
||||||
Please do not send pull request. If you need new feature, fork it, and maintain
|
Appreciate your help!
|
||||||
it like one of your own. Appreciated!
|
|
||||||
|
|
||||||
Enjoy!
|
Enjoy!
|
||||||
Reference in New Issue
Block a user