Comments (20)
原先有trojan的话,会被覆盖掉的,你可以手动下载二进制文件来运行, ./trojan web
from trojan.
如果直接运行./trojan web 的话原来的trojan config会保持不变吗? 还有web端的话是由我原来的nginx来负责还是让trojan接管?
from trojan.
web端是和二进制文件放一起的。你可以起用./trojan web -p xxx 指定其他端口,而80留个nginx, 让nginx转发过去
from trojan.
我试着用你教的方法运行起来了, 但是好像对接不到我已有的trojan,这个有办法解决吗,谢谢
from trojan.
你的trojan是安装在什么目录呢, https://github.com/trojan-gfw/trojan-quickstart 官方的这个脚本是安装在/usr/local/bin目录下
from trojan.
本项目因为要用到全局trojan命令,所以将trojan安装到/usr/bin/trojan/trojan, 而管理程序就放到/usr/local/bin/下面,输入trojan就可以进入管理程序
from trojan.
二进制文件放在/etc/trojan/ 下, 那我ln-s 到 /usr/local/bin?
from trojan.
应该指向这里/usr/bin/trojan/trojan, 可以试试
from trojan.
嗯,ln后可以识别版本号了,但是无法添加trojan用户,点击确认没反应, 后台log如下
[root@RUO ~]# ./trojan web -p 4544
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /auth/check --> trojan/web.Auth.func2 (5 handlers)
[GIN-debug] POST /auth/login --> github.com/appleboy/gin-jwt/v2.(*GinJWTMiddleware).LoginHandler-fm (5 handlers)
[GIN-debug] POST /auth/register --> trojan/web.updateUser (5 handlers)
[GIN-debug] POST /auth/reset_pass --> trojan/web.updateUser (6 handlers)
[GIN-debug] POST /auth/logout --> github.com/appleboy/gin-jwt/v2.(*GinJWTMiddleware).LogoutHandler-fm (6 handlers)
[GIN-debug] POST /auth/refresh_token --> github.com/appleboy/gin-jwt/v2.(*GinJWTMiddleware).RefreshHandler-fm (6 handlers)
[GIN-debug] GET /trojan/user --> trojan/web.userRouter.func1 (6 handlers)
[GIN-debug] POST /trojan/user --> trojan/web.userRouter.func2 (6 handlers)
[GIN-debug] DELETE /trojan/user --> trojan/web.userRouter.func3 (6 handlers)
[GIN-debug] POST /trojan/data --> trojan/web.dataRouter.func1 (6 handlers)
[GIN-debug] DELETE /trojan/data --> trojan/web.dataRouter.func2 (6 handlers)
[GIN-debug] GET /common/version --> trojan/web.commonRouter.func1 (6 handlers)
[GIN-debug] GET /common/serverInfo --> trojan/web.commonRouter.func2 (6 handlers)
[GIN-debug] POST /common/loginInfo --> trojan/web.commonRouter.func3 (6 handlers)
[GIN-debug] Listening and serving HTTP on :4544
open /usr/local/etc/trojan/config.json: no such file or directory
2020/03/31 06:05:56 [Recovery] 2020/03/31 - 06:05:56 panic recovered:
POST /trojan/user HTTP/1.1
Host: ruod.top:4544
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
Authorization: *
Content-Length: 246
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryog7mVCOtfWo1gI38
Cookie: jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODU2NTI3MTUsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU4NTY0OTExNX0.rWg0C6vrM5pdh8aAaeqtb2WU-XQ7cC8TDFAnFDV-kpI
Origin: http://ruod.top:4544
Referer: http://ruod.top:4544/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4093.3 Safari/537.36
runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:212 (0x44abe9)
/usr/local/go/src/runtime/signal_unix.go:687 (0x44aa38)
/home/go/trojan/core/server.go:74 (0xa4b88b)
/home/go/trojan/web/controller/user.go:50 (0xa4b871)
/home/go/trojan/web/web.go:29 (0xa4f7e7)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 (0xa2b1da)
/home/go/pkg/mod/github.com/appleboy/gin-jwt/[email protected]/auth_jwt.go:393 (0xa40660)
/home/go/pkg/mod/github.com/appleboy/gin-jwt/[email protected]/auth_jwt.go:355 (0xa435f3)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 (0xa2b1da)
/home/go/pkg/mod/github.com/gin-contrib/[email protected]/gzip.go:47 (0xa4c690)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 (0xa2b1da)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:83 (0xa3e63f)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 (0xa2b1da)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0xa3d770)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:147 (0xa2b1da)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:403 (0xa34e52)
/home/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:364 (0xa3455c)
/usr/local/go/src/net/http/server.go:2807 (0x75d8a2)
/usr/local/go/src/net/http/server.go:1895 (0x75921b)
/usr/local/go/src/runtime/asm_amd64.s:1373 (0x464c80)
from trojan.
那个trojan配置文件,能否移动下,移动到/usr/local/etc/trojan/,还有mysql有没有安装呢
from trojan.
安装了mysql后记得修改trojan配置文件,管理程序是读trojan配置文件来连mysql的
from trojan.
你可以用管理程序安装管理那里可以安装mysql,移动完配置文件再来安装
from trojan.
请问数据库用mariadb(Centos默认)可以吗?如果用mariadb的话提示链接不上mysql, 还是一定要mysql?
from trojan.
没测过,最好还是用mysql, 你可以用管理程序本身来安装mysql, 安装管理那里有
from trojan.
我发现mysql好大, 400多M, 大伙的trojan-panel用的好像是MariaDB不是mysql, 不知道以后您这个项目会不会支持MariaDB, 如果支持的话到时候再过来玩玩, 谢谢~
from trojan.
有空我测下mysql版本和mariadb的兼容性
from trojan.
我测了用docker版mariadb 没问题,貌似比mysql要省内存
from trojan.
就是说其他的都保持不变,直接把mysql换成mariadb也可以正常用对吧?我改天试一下,谢谢
from trojan.
是的,https://github.com/go-sql-driver/mysql, 只要这个驱动支持的都能连,mysql8也是问题的
from trojan.
恩恩,我去试试,有问题再来请教~
from trojan.
Related Issues (20)
- 请问能否在Trojan Web 的管理面里再创建多一下admin用户
- 域名解析有误?
- 修改web端口,还需要修改trojan 本身的config
- source无效
- 请问clash X有没有ubuntu Linux版的
- 使用docker部署trojan报错启动trojan失败! HOT 7
- 申请支持Sing-Box
- 这个还稳定么,有用过的说下么 HOT 4
- 数据库password字段是怎么加密的,想自己二次开发有代理商功能的面板 HOT 2
- 我修改了端口,为什么还会有个80端口占用呢?
- 大神,你好,我想问下,每天凌晨0点准时,trojan是操作什么数据吗?导致数据库CPU占用很高,然后客户端就连接超时了。持续3分钟,CPU才降下来。 HOT 2
- 通过source <(curl -sL https://git.io/trojan-install)安装时,闪退 HOT 1
- 大佬可以优化一下,每天0点重置过期的用户和每月重置流量的SQL语句嘛?
- 修改为非443端口后,web管理页打不开
- clash 如何配置server trojan 开启ws并开启了 "shadowsocks": { "enabled": true,
- 开启cdn无法访问管理面板的解决方法和问题所在
- 用户名为中文时,一部分名字点击分享导到clash的订阅链接会token is error HOT 1
- Source code statistics traffic problem HOT 1
- 目前使用下来是一天一封一个端口,请教一下大家这个跟vps服务商有关系吗?
- clash导入报错initial rule provider direct error:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trojan.