Commit Graph

512 Commits (2b3d96e080a10f59ebd66821d3681415f93acb1b)

Author SHA1 Message Date
crazypeace 2b3d96e080
Merge 84a95d0ed3 into 1cf19c7186 2024-09-21 16:36:16 +08:00
crazypeace 84a95d0ed3 Init Command (execute the command after login) 2024-09-21 15:49:46 +08:00
crazypeace 7105543a95
补充 部署到Hugging Face的教程 / 作者 Xiang xjfkkk 2024-09-02 18:01:54 +08:00
crazypeace deaf71ae69
define('encoding', default='utf-8',
https://linux.do/t/topic/130852
作者
Xiang
xjfkkk
2024-09-02 17:47:47 +08:00
crazypeace f648d3db3f
Update README.md 2024-06-11 14:17:22 +08:00
crazypeace 352625d73e
Update README.md 2024-02-05 13:07:39 +08:00
crazypeace e5b8da7aeb
Update README.md 2024-02-05 13:07:26 +08:00
crazypeace cbb883cdee Merge branch 'master' of https://github.com/crazypeace/huashengdun-webssh 2024-01-17 23:34:33 +08:00
crazypeace 424a093169 a href link 2024-01-17 23:34:27 +08:00
crazypeace 801e395e9a
Update README.md 2024-01-05 21:55:34 +08:00
crazypeace c93a92c4d0 ads 2023-12-08 17:50:34 +08:00
crazypeace b26df6b360 if (usrnamestr == "") { portstr = "root" }
if (usrnamestr == "") {
        portstr = "root"
    }
2023-11-17 06:49:55 +08:00
crazypeace 57f99b1051
Build SSH link for huashengdun-webssh 2023-11-17 06:27:33 +08:00
crazypeace 47fa9a2f43 Create Build-SSH-Link.user.js 2023-11-17 05:28:14 +08:00
crazypeace a8dc72f065
Add files via upload 2023-11-16 02:26:53 +08:00
crazypeace 176e6c6fa7
Update main.js 2023-11-13 02:45:49 +08:00
crazypeace c6bed4a679
Update index.html 2023-11-13 02:40:40 +08:00
Shengdun Hua 1cf19c7186
Merge pull request #346 from bhubr/set-cursor-color
Add cursor query param to set xterm.js cursor color
2023-05-03 06:14:39 +08:00
Benoît Hubert a1c0ded18a Add cursor query param to set xterm.js cursor color 2023-05-01 15:36:17 +02:00
Sheng 47cfeed020 Updated minor version 2023-04-09 14:37:15 +08:00
Sheng aabdfc597f Updated workflows 2023-04-09 14:31:18 +08:00
Shengdun Hua 21ab5ccd23
Merge pull request #342 from cclauss/patch-1
README.md: Switch badge from Travis CI to GitHub Actions
2023-04-05 16:51:59 +08:00
Christian Clauss bbdc14b128
README.md: Switch badge from Travis CI to GitHub Actions 2023-04-05 10:44:32 +02:00
Shengdun Hua bf76954874
Merge pull request #341 from cclauss/patch-1
GitHub Action to lint and test Python code
2023-04-05 16:34:40 +08:00
Christian Clauss c79d4bad0b
Comment out PyPy for now 2023-04-05 09:46:26 +02:00
Christian Clauss 53a3559125
pip install pytest -r requirements.txt 2023-04-05 09:38:01 +02:00
Christian Clauss 8bfbb250a9
Update and rename ruff.yml to python.yml 2023-04-05 09:34:53 +02:00
Christian Clauss b1b904c1e3
Update ruff.yml 2023-04-05 09:16:07 +02:00
Christian Clauss da68de67fa
Delete .travis.yml 2023-04-05 09:14:42 +02:00
Christian Clauss 0fb176a724
Add pytest 2023-04-05 09:13:23 +02:00
Christian Clauss b9260ec384
GitHub Action to lint Python code
Because Travis CI is no longer free for open source.
2023-04-05 08:54:21 +02:00
Shengdun Hua e21b6a23c6
Merge pull request #340 from klarose/fix-null-encoding
handle invalid characeters in encoding
2023-04-05 14:33:08 +08:00
Kyle Larose dfea8a1624
handle invalid characeters in encoding
When establishing a connection to an SSH server, WebSSH tries to guess
at its encoding using a command sent prior to opening the terminal.
Unfortunately, sometimes this can return data which does not form proper
input for the `encode` function used by `is_valid_encoding` to test
whether the encoding is known.

In particular, we ran in to a case where the server was returning a
string which had a \0 in it when converted to ascii. That raised a
`ValueError` (as opposed to `LookupError`), which was uncaught.

Handle the `ValueError` case as well, treating it as an unknown encoding
so that we fall back on the default.
2023-03-30 10:52:53 -04:00
Sheng 04a9bd5eff Support for Python 3.8+ 2023-03-08 11:34:26 +08:00
Sheng 5ffb1da69b Drop support for Python version below 3.8 2023-02-27 22:13:24 +08:00
Sheng bb2fba30f3 Removed LGPL 2023-01-17 13:23:41 +08:00
Sheng 04bd859f15 Bump version to 1.6.1 2022-11-21 17:12:05 +08:00
Sheng 50fc9908eb Added test_worker_closed 2022-11-21 16:48:49 +08:00
Sheng 9238c01c35 Updated test_failed_weak_ref 2022-11-21 16:39:13 +08:00
Sheng 2a46b52eac Close websocket if there is no corresponding ssh connection 2022-11-21 14:52:38 +08:00
Sheng 9a7cfe767c Use uuid4 to generate id for Python3.5 Python3.4 Python2.7 2022-11-21 14:32:41 +08:00
Shengdun Hua a3cb94b45e
Merge pull request #306 from klarose/handle-closed-worker
do not process message for closed workers
2022-11-21 14:01:21 +08:00
Shengdun Hua 7b18eac7a6
Merge pull request #305 from klarose/more-secure-worker-id
use secrets to generate worker id
2022-11-21 11:26:38 +08:00
Kyle Larose f0e2ddb821
do not process message for closed workers
WsockHandler stores a weak reference to the ssh backend worker. The
worker closes itself if the backend connection closes (e.g. the user
exists the ssh session). That happens in parallel to the websocket
handler processing messages, so it is possible for a message to arrive
when the worker no longer has any strong references, leading to an
exception being thrown.

Handle this case by treating the None worker the same way we do invalid
messages: by simply returning.
2022-11-18 08:55:03 -05:00
Kyle Larose 1b62f379ed
use secrets to generate worker id
The worker ID right now is typically based off the address of an object
in memory. This could be guessed. While the worker is tied to a
specific IP, there is a chance an off-path attacker could be hosted
behind the same IP as the caller. They could possibly guess the worker
id of an unclaimed session by observing the sequence of IDs presented to
themselves, leading to them gaining access to an already authenticated
SSH session.

Use the python secrets module to generate a cryptographically secure
token to use as the worker ID. This shoud be much harder to guess.
2022-11-17 15:26:05 -05:00
Sheng ee24eb7f65 Fixed a bug of getting custom font url 2022-10-30 14:37:11 +08:00
Shengdun Hua 4aec063197
Merge pull request #284 from kensonman/alpine
Change the Docker base image from python:3-slim to python:3-alpine.
2022-05-29 10:58:57 +08:00
Kenson Man 309d912985 Change the Docker base image from python:3-slim to python:3-alpine.
The final image will be ~79.6MB instead of 163MB. It has 48% smaller.
2022-05-27 12:47:19 +01:00
Sheng a9d959ffb7 Bump to version 1.6.0 2022-05-02 20:07:32 +08:00
Sheng 97e6d25556 Support Python 3.9 2022-05-02 19:58:38 +08:00