npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

breakjail

v0.1.0

Published

breakjail internet fireware to access all website

Downloads

14

Readme

Todo

  • (done) 修改 server 名称, domestic/foreign
  • (done) 添加新的 app,或者称其为改 app 名称为 undefined
  • (done) 进行 ip 记日志于内存中,可以访问 breakjail.noradle.com/log/ip 查询
  • (done) 进行权限过滤,基于 IP 地址的,只限产创指定 IP.
  • (done) 记录访问者 IP,记录日志,发现白名单外的就要显示系统500障碍
  • (close) 增加特殊 UA 特征的允许访问权限,把自己加进去,意义不大,因为自己使用也蛮烦
  • (done) 当访问了 breakjail.noradle.com/door/open 后即可运行自己的 IP 使用系统,并可坚持一个小时
  • (done) nodester 如何支持高版本 node, 至少支持到它所生成的 v0.6.17
  • (done) foreign proxy use agent to access target website
  • (done) 到国内站点则不绕道国外的nodester再回来,而是直接访问
  • (done) 记录视频URL(不过似乎视频url都不是http协议的)
  • (done) 使用 bootstrap 来实现
  • 支持 L2TP,PPTP,IPSec VPN 访问,用以支持 iOS 设备访问

不着急的功能

  • 进行内容加密(目前是审查器不会查看http实体内容)
  • 支持 https 代理 (如果是本来可达的网站,https 访问不设代理即可)
  • 可以选择多个 node 云部署,本地可以按策略选择最合适的国外代理
  • support audio/video stream (非http只会按照IP封网,而域名对应的IP总会变一般不容易被封)

paas_test

test for host my nodejs app in paas

如何绕过 nodester 的 proxy 限制

nodester 的 proxy 拦截机制

来自 browser 浏览器的 proxy 会发送 x-forward-xxx request header,nodester 不会拦截 但是对于 get url 中 url 不是自己的请求会进行拦截,从而造成部署到 nodester 的代理根本就接受不到请求

解决方法:二级 proxy

第一级:将 request url 信息保存到 x-breakjail-url 中

将 proxy 请求的痕迹完全清除,并将其信息转移到 x-breakjail-xxx 中

在第一级将进行鉴权,考虑到 windows 下 browser 可能不支持设置代理的用户名和密码,

暂时先设计成按照客户端 ip 进行限制,比如只有指定 ip pattern 才能访问第一级 proxy

第二级:将 x-breakjail-url 变成请求的 host/port

只允许来自第一级 proxy 的请求,也就是 nodester 给出的 x-forwarded-for 的地址访问,

当然还有就是来自我自己IP地址的访问。

代理对 http 头的处理

http header 有 end-to-end, hop-to-hop 两种,应该只对 end-to-end header 进行继承, 对 hop-to-hop header 进行 override

比如说 connect header,只在代理层进行处理即可

Problem

https access from browser to target

or https proxy, browser use ssl to connect to proxy

https 请求到了本地代理是否是加密的呢?

目前看,browser 访问 https 站点,本地代理由于只监听 http 端口,根本无法监听 https 请求。

local proxy use https to access nodester breakjail app

应该对 breakjail nodester 部分监听 https 服务

然后在 local proxy 上使用 https 请求(这个目前还不太容易做到,因为 node 好像不支持)

这样从国内经过国际关口局的过滤器到nodester的流量就是加密的了

key: fs.readFileSync("keys/userB.key"),
cert: fs.readFileSync("certs/userB.crt"),
ca: fs.readFileSync("ca.crt"),
rejectUnauthorized:true,
requestCert:true,

openssl req -new -x509 -nodes -out breakjail.crt -keyout breakjail.key

但是 domestic proxy 不能向 foreign proxy 建立 https 连接,因为 foreign proxy 处在 nodester 反向代理之后,而它不支持 https 访问

因此加密只能采用其他方式,需要单独加密的内容包括:

隐藏可能泄露敏感信息的 http headers

  1. path in request line,因为上面的 query string 可能存在要被过滤的信息
  2. referer 上面可能包括要被过滤的信息
  3. cookie 上的信息 要将上述信息一起打入一个逗号分割的 base64 header - x-undefined: 然后
  4. path = /favicon.jpg
  5. referer = 空
  6. cookie= 空 这样关于用户信息就没有什么可用于泄露的了

变更域名

重新从 nodester 上申请新应用名字,叫做 ntmxfwdm 这样谁也不知道他是干什么的,但是使用一个不在字典里的名字可能也会遭到怀疑,因此还是起个字典里的名字好些,比如叫做 undefined.nodester.com,正常其他人都不会注意它了。

上行下行内容进行加密传输

对上行下行传输的内容使用客户 header 敏感信息 作为 key 进行加密, 这样即使通过暴力破解找到了 key,该 key 也只在很小的范围内有用,不能用于解开其他人的通信。

todo

用户认证和权限控制

用户名,密码

使用 node2psp 数据库配置允许访问的列表

只有来自该列表ip的访问才允许访问

使用手机号认证

当来自非允许访问范围的访问时,会获取手机号,并参照允许访问的手机号控制

  • 来自 wap 的直接获取手机号
  • 来自联通 gprs 的访问调用号码识别服务获取手机号
  • 来自手机短信

将调用获取手机号做成标准 connect 模块

原先的号码识别服务进行三位一体的升级

  • 用户直接访问号码识别服务获取自己的号码
  • 网站使用本 connect module 获取号码(服务器IP,端口都有 request 对象自动导出,如果behind reverse proxy,需要给定参数指定 server ip/port,然后从 x-forwarded-xxx 获取客户端地址端口)

速度

对于国内的请求,直接在一级代理帮助转发

这样用户不会对可以在一级代理访问的情况下网站,绕道美国在出口转内销

所有来自美国代理的返回结果,都进行压缩返回

使用 gzip 按照尽量最大压缩比传回,然后在本地一级代理解压缩或者直接供给浏览器

本地代理会缓存来自国外代理的返回内容

这样可以避免每次访问都从国际出口加载内容

加密

国内国外代理间使用 https

这样浏览器完全加密,就不可能被审查过滤掉,因为没有过滤过程,速度也会相应加快。

https 访问支持

deployment

curl -X POST -d "coupon=ryahrox&[email protected]&password=pspdweb&[email protected]&rsakey=ssh-rsa AAAA..."

npm install nodester-cli -g nodester user setup kaven276 nodester276@ nodester user setkey

http://breakjail.nodester.com port 17225

从开发者机器同步软件到目标服务器

rsync -av -C -e "ssh -p 60222" /Users/cuccpkfs/dev/project/breakjail [email protected]:

从命令行启动各个服务

ssh -p 60222 [email protected] cd breakjail nohup forever server_mine.js prod & nohup forever server.js test2 &

rsync -av -C -e "ssh -p 60222" ~/.ssh/id_rsa.pub [email protected]:./ssh

undefined.rs.af.cm mdb-kiv