Here are some ideas to get you started:
- 🔭 I’m currently working on Darabonba.
Running static file server anywhere / 随启随用的静态文件服务器
License: Other
Here are some ideas to get you started:
增加一些过滤配置项,用来包含或过滤文件后缀。
在某些情况下,只想将某些文件比如.txt .js .css 等类型文件展示出来,或者不想展示出 .exe .bat 等文件。
支持类似Apache DirectorySlash off 的配置么?
SPA模式下,路由都是前端识别的,页面都只需重定向到首页,比如访问/user/center, 实际只想它跳到/index.html,其他的模块/user/center都由js加载,可否做到,怎么做,谢谢回答!
目前是不是还没有gzip的功能 可否增加 ?
anywhere在功能上是否是http-server的简化?
安装是
npm install anywhere -g
但在D盘一级目录 运行会出现以下错误:
Running at http://192.168.11.217:8000/
Error: EPERM, stat 'D:\Config.Msi'
at Error (native)
二级目录下又可以正常运行了,求答疑!
windows会报这个错
Error: EPERM: operation not permitted, stat 'D:\System Volume Information'
at Error (native)
node version: 8.9.2
npm version: 5.5.1
OS : windows 10
it works before in former version & how to resolve that
waiting for your reply
想不到随便把一个目录当做静态文件服务器的用途在哪里?可以给举个能直接体现功能的例子么?
app.use(serveIndex(argv.dir, { 'icons': true }));
有冲突,注释掉这一句。反正一般也用不上在浏览器中查看文件夹list
直接通过github安装吧
如题,windows默认使用gbk编码,而anywhere使用的connect中间件默认是utf-8编码,我自己尝试修改如下:
app.use(function (req, res, next) {
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader("Content-type", "text/html; charset: utf-8"); // 设置响应头编码为utf-8
next();
});
不过很遗憾没有效果,希望作者能够帮忙给以解决,让anywhere越来越强大!
我没有cmd+c
退出Node.js,而是直接关闭了zsh窗口,然后我启动的服务并没有停止,需要我找到对应的pid然后手动kill。请问能解决一下么?
ubuntu@VM-0-8-ubuntu:~$ anywhere -h localhost -p 8888
Running at http://localhost:8888/
Also running at https://localhost:8889/
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
npm: 5.6.0
node: v8.11.1
os: ubuntu 16.04
看了那篇博文过来这边看到anywhere,然后发现本来有的代码(range\压缩等)这边都去掉了...是因为node升级后原生支持那些了吗..
那篇博文非常有帮助,感谢作者!
之前树莓派还能用
新装遇到错误
root@pi4-001:/home/pi# anywhere -p 8080 -s
_tls_common.js:135
c.context.setCert(cert);
^
Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
at Object.createSecureContext (_tls_common.js:135:17)
at Server (_tls_wrap.js:903:27)
at new Server (https.js:62:14)
at Object.createServer (https.js:85:10)
at Object.<anonymous> (/root/.nvm/versions/node/v10.23.0/lib/node_modules/anywhere/bin/anywhere:131:7)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
应该是和 jfromaniello/selfsigned#33 类似,key需要改成2048,还望作者可以更新下
我执行 npm run build 后,再执行 anywhere,错误如下
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
我执行 npm run dev 项目运行正常
我利用anywhere打开一个静态文件server,它提供的下载速度能占满我的带宽吗?
如题
RT
在windows上,anywhere会默认打开一个http://192.194.2.3:8080这样的地址,但是我想让他默认打开一个http://localhost:8080的地址,要怎么做?
如题,想做到跨域访问
可以增加图片预览的功能吗?
mac里面是支持的 不过windows不行哦
https://github.com/JacksonTian/anywhere/blob/master/bin/anywhere#L59
在 Linux Server 端,没有 GUI 没有 Browser, 如果不使用 -s 就会默认打开浏览器产生异常,错误如下:
/workspace anywhere /workspace 130 ↵
Running at http://172.17.0.2:8000/
Also running at https://172.17.0.2:8001/
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at exports._errnoException (util.js:1020:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
at onErrorNT (internal/child_process.js:376:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:496:3
我的建议,如果要默认打开的话,是否可以增加浏览器检测,或者一些其他手段防止异常,比如 Catch 掉产生 Warning?否则一开始运行的时候很容易搞不清状况,不知道是少了 -s 才能运行。
下载一个大文件之后,内存飙升,下载完成之后不会释放(除非有新的请求过来,内存才会释放),是否可以优化下?
请问 这个可以实现http上传下载文件吗?
anywhere运行报错,centos和Ubuntu都这样(win下是好的):
anywhere -v
···node
Running at http://10.180.44.232:8000/
Also running at https://10.180.44.232:8001/
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
at Function.Module.runMain (module.js:443:11)
at startup (node.js:139:18)
at node.js:968:3
···
其他node全局模块是可以运行的。
可否添加gzip支持,方便测试性能问题
Hi!
Although currently not exploitable remotely you should always escape user input before passing it to exec()
or spawn()
:
Lines 51 to 65 in c5c4f8f
for this you can use shellescape()
(https://www.npmjs.com/package/shell-escape) or escape()
. Otherwise an input like ./anywhere -h "localhost; touch code_exec.txt #"
may become exec("open http://localhost; touch code_exec.txt #:8000/")
an thus lead to arbitrary code execution (creating a file in this example).
Best
0x6d636c61757373
不然都可以访问到了
增加可以console访问记录的功能,方便调试。
when I run in linux。
it throw a error : spawn xdg-open ENOENT
luckysheet 如何本地引入,官网一行字介绍了,但是表达的不清楚,三个问题。
1,要引入的源文件在哪?
2,文件具体放在代码的哪里?
3,有代码演示吗?
There is a security issue that comes from the npm package kind-of
.
After running the command npm list kind-of
, we can see it comes from http-proxy-middleware
.
https://snyk.io/test/github/JacksonTian/anywhere
└─┬ [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected] deduped
└─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ └── [email protected]
│ └── [email protected]
└─┬ [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└── [email protected]
Hi,
I'm a member of the Node.js Security WG and we received a report regarding a security issue with this module.
We tried inviting the author by e-mail but received no response so I'm opening this issue and inviting anyone with commit and npm publish rights to collaborate with us on a fix.
建议更换一个受信任的证书吧?开发时很不方便也不支持更换自己的证书
because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
这个是怎么回事
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.