Git Product home page Git Product logo

regx's Introduction

regx-node license

使用 Node.js 驱动的全新 Minecraft 网页注册系统,当然,它一般用来配合 AuthMe-Reloaded 插件使用

目的是将原插件的指令注册抛弃,防止熊孩子无限假人刷注册进服捣乱,使用此系统后可以将原插件的注册功能关闭

此项目为 Authme-reger 的重写版,新版本重写了整个前端模板,同时使用 Node.js 重写了后端,修复了一些历史遗留问题

警告信息

本项目年代久远,期间衍生出 authlib-injector 等外置登录技术,无论在安全性、易用性上都比本项目要好得多,因此我不再推荐各位使用本项目。

请您在使用本项目之前思考以下几点问题:

  • 我是否只需要一个简单的注册页面?
  • 我的登录系统是否为 Authme 且不考虑更换?

如果您最终的回答都为“是”,那么您可以使用本项目,否则我依然推荐您去使用基于 authlib-injector 的验证系统(如:BlessingSkin)。

功能特性

  • 兼容 AuthMe Reloaded 5.4.0 (最新版本)
  • 实时检测用户输入的内容并提交后端验证
  • 腾讯点击式防灌水验证码
  • 发送邮件验证码验证邮箱
  • 注册昵称白名单/黑名单
  • 注册邮箱白名单/黑名单
  • 注册IP归属地白名单/黑名单
  • 相同IP间隔N分钟后才能注册
  • 支持 Authme 插件常用的加密算法

如何启动

将项目 Clone 到本地,使用 cd 命令切换到项目根目录,执行命令 npm install 来安装项目的依赖包

用编辑器打开 config/config.json 并填写数据库等信息,您可以根据自己的需要来调整相应的配置项

执行命令 npm run start 启动服务端,您会在控制台看到一行提示 "Server is running on host XXXX"

如果您没有改动过默认配置,那么您现在访问 127.0.0.1:1234 就会出现页面了

配置文件

正在书写...

反向代理

Nginx 反向代理 (推荐)

nginx.confhttp 中添加一个 server 节点,示例如下:

http {
  # regx 反向代理节点
  server {
      listen        80;
      server_name   www.yoursite.com;

      location / {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host  $http_host;
          proxy_set_header X-Nginx-Proxy true;
          proxy_set_header Connection "";
          proxy_pass http://127.0.0.1:1234;
          proxy_intercept_errors on;
      }
      error_page   404  /404.html;
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
          root   html;
      }
  }
  # 其它 server 节点...
}

listen 80; 为监听 80 端口(即 http 协议),如果开启 SSL (即 https 协议)那么请修改为 listen 443; ,并添加相应的 SSL 配置代码,具体代码就不在此贴出,一般证书提供商都会有相应的配置代码

server_name www.yoursite.com; 为绑定域名,将其修改为您的域名

proxy_pass http://127.0.0.1:1234; 后面的 :1234 为端口号,可根据站点的配置修改

添加完成后,保存配置文件,然后重启 Nginx

以上面为例子的话,此时访问 www.yoursite.com 即可显示注册页面

注意: 推荐开启 SSL ,此项目支持全站 HTTPS

开源协议

项目使用 AGPL-3.0 协议开源

具体请查看 https://github.com/sc0utz/regx/blob/regx-node/LICENSE

regx's People

Contributors

dependabot[bot] avatar gaoxansheng avatar hhui64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

regx's Issues

验证码接入问题

目前腾讯验证码接入平台已无法接入新用户,老用户正常使用,但是代码提示XXID错误导致无法主城,这个请问怎么解决,

验证码

能不能使用其他验证码,腾讯太贵了

安装问题

我输入npm run start后,出现如下报错:
[root@localhost mc6.starmc.cn]# npm run start

[email protected] start /www/wwwroot/mc6.starmc.cn
node server.js

/www/wwwroot/mc6.starmc.cn/server.js:24
(async function(){ //启动时检查数据表是否存在
^^^^^^^^

SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)

npm ERR! Linux 3.10.0-1062.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
npm ERR! node v6.17.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the regx-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs regx-node
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls regx-node
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /www/wwwroot/mc6.starmc.cn/npm-debug.log

npm-debug.log内容为:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/www/wwwroot/mc6.starmc.cn/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
10 verbose lifecycle [email protected]
start: CWD: /www/wwwroot/mc6.starmc.cn
11 silly lifecycle [email protected]start: Args: [ '-c', 'node server.js' ]
12 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: node server.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:920:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid [email protected]
16 verbose cwd /www/wwwroot/mc6.starmc.cn
17 error Linux 3.10.0-1062.el7.x86_64
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
19 error node v6.17.1
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] start: node server.js
22 error Exit status 1

请问这个报错是这么处理

[email protected] start /www/wwwroot/World
node server.js

internal/modules/cjs/loader.js:626
throw err;
^

Error: Cannot find module 'express'
Require stack:

  • /www/wwwroot/World/server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object. (/www/wwwroot/World/server.js:8:18)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/www/wwwroot/World/server.js' ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: node server.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-01T15_33_53_830Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.