Skip to content

Commit

Permalink
more reorg as a monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
williamstein committed Aug 25, 2023
1 parent 7320dd7 commit 8fa2dd2
Show file tree
Hide file tree
Showing 44 changed files with 21 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ and in another terminal:
Welcome to Node.js v16.20.1.
Type ".help" for more information.
> // serve HOME and mount it at /tmp/mnt all over websocketfs
> z = await require('.').bind(process.env.HOME,'/tmp/mnt'); null
> await require('./websocketfs').bind(process.env.HOME,'/tmp/mnt'); null
```

Then in another terminal, type `ls /tmp/mnt`:
Expand Down Expand Up @@ -101,6 +101,12 @@ without FUSE.
**MacOS?:** I don't know if it will work or not. FUSE is weird on MacOS due to security constraints and commercial interests.
_I'm developing this for Linux._

### Installing just the sftp protocol

You can install the module `websocket-sftp` alone, which doesn't depend
on fuse-native, and provides the client and server for communicating over
sftp, but not the FUSE bindings.

## Background

I wish there was something like sshfs, but entirely over a websocket that doesn't use ssh at all. I found this [ancient and forgotten project from 8 years ago](https://github.com/lukaaash/vfs/tree/master), then rewrote it to not use sshfs at all and instead use libfuse2 bindings to nodejs. It is going to be like what sshfs provides, except entirely 100% using Typescript/Nodejs \+ a websocket for the transport and fuse bindings. This could also be extended to work in browser \(for WebAssembly with WASI\), providing basically "sshfs for the browser". The real work to make this possible is in [this also ancient forgotten implementation of the entire sftp protocol](https://github.com/lukaaash/sftp-ws) in Typescript from 8 years ago, as explained in [this blogpost](https://lukas.pokorny.eu/sftp-over-websockets/).
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"build": "pnpm --filter=* build",
"test": "pnpm --filter=* test",
"clean": "pnpm --filter=* clean",
"test-all": "pnpm --filter=* clean && pnpm install && pnpm --filter=* build && pnpm --filter=* test"
}
}
3 changes: 0 additions & 3 deletions packages/pnpm-workspace.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions packages/pnpm-lock.yaml → pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages:
- websocketfs
- websocket-sftp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "websocket-sftp",
"version": "0.1.0",
"version": "0.5.0",
"description": "The sftp protocol, over a WebSocket",
"exports": {
".": "./dist/lib/sftp.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8fa2dd2

Please sign in to comment.