GithubHelp home page GithubHelp logo

lazy-luo / smargate Goto Github PK

View Code? Open in Web Editor NEW
3.9K 3.9K 442.0 1001.36 MB

内网穿透,c++实现,无需公网IP,小巧,易用,快速,安全,最好的多链路聚合(p2p+proxy)模式,不做之一...这才是你真正想要的内网穿透工具!

JavaScript 100.00%
android free ipv6 nat p2p proxy tools

smargate's People

Contributors

lazy-luo 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smargate's Issues

在 OpenWrt 中安装 smarGate 如何解决依赖文件不存在问题?

我根据 #32 中方法,在 OpenWrt(cpu 是x86_64) 中安装 smartGate,在安装过程中遇到了依赖缺失的问题,通过 ldd 查看动态依赖库,结果如下:

root@OpenWrt:/opt/smargate# ldd ./proxy_server
        /lib64/ld-linux-x86-64.so.2 (0x7fc4ed20d000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fc4ed20d000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fc4ed20d000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fc4ed20d000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ./proxy_server)

我发现 OpenWrt 根本没有对应的库,于是进入到 lib64 目录查看了下,内容如下:

root@OpenWrt:/lib# ls
config               libatomic.so.1.2.0   libjson_script.so    libustream-ssl.so    preinit
firmware             libblkid-tiny.so     librpc.so            libvalidate.so       upgrade
functions            libblobmsg_json.so   libsetlbf.so         modules              wifi
functions.sh         libc.so              libubox.so           mwan3
ld-musl-x86_64.so.1  libfstools.so        libubus.so           netifd
libatomic.so.1       libgcc_s.so.1        libuci.so            network

不知道要如何解决这个问题呢?
谢谢!

手机ipv6支持

服务端有ipv6,但是只出不进,ipv4 nat对称型,手机端ipv6全开放,ipv6不能直连走中转,作者似乎没有考虑到这种情况,所以提功能吧!

远程投屏支持

下个版本计划支持原创投屏,如有类似需求的童鞋讨论一下各自需求。敬请期待。。。

怎么将日志输出到文件?

我在 OpenWrt 中配置 proxy_server,手机上有时可以看到访问点,有时又不行。
当可以看到访问点的时候,没有 v4 或者 v6 的图标,什么图标也没有。
所以,我想打印下日志找一下原因。
请问:

<log-level value="LOG_ERROR"/>
<log-write-mode value="FILE_ONLY"/>

上面这两个设置项目有哪些可选值呢?我要怎么才能实现将日志输出到文件呀?谢谢。

可以考虑windows10开机无需登陆自启吗

目前尝试在windows10下开机未登录自启动程序,尽管程序可以启动,但是在手机上面并不能搜索到这台机器,开机之后手动执行bat脚本程序可以正常启动使用。

目前windows10开机自启动是这样,其他系统没有测试过

有些地方理解不了

比如readme里写的4g+ipv6,那么手机必须使用移动数据网络才可以吗?

目前我的状况是这样:家中黑群,单位手机可以连宽带的wifi,电脑是使用宽带,和手机是一个局域网,另有一个公网IP的VPS,这种情况如何环境如何搭建?

家里和单位均为NAT,没有公网IP,且运营商不同。

望回复。

Windows or macOS设备的客户端

每次都要带着安卓机 有点奇怪 前提办公室设备都可以分配ipv6 现在使用都是用电脑去访问同一局域网下的安卓设备的ip+端口 可不可以直接适配一套 macOS/Windows的客户端?

MIUI11 android8.0下大概率闪退,用户无法升级webview

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

启动命令里必须加-u才可以启动

如这样:

/root/smargate/proxy_server -i1000 -o1000 -w8 -u xxxxxxxxxxxxx:y

另外代理服务端也必须这样启动,但代理服务器带上-u参数后会被识别成服务端。

直接运行不带参数比如/root/smargate/proxy_server会报错:

root@fqdn:~# /root/smargate/proxy_server
no environment-variable "SMS_HOME" define.
Server config file is: /root/conf-proxy.xml
[INFO]  plugin path is:/root/plugin/
[WARNING]       NOT-FOUND library in :/root/plugin/
[ERROR] load plugin module error.

*****************************NO PLUGIN INFORMATION*****************************
[ERROR] you must assign user-name whith command option -u xxx:yyy


The module[MAINCONTROLER] has been exited!

[INFO]  Application has been exited!

the server stop.

附我的代理服务器配置:

<?xml version="1.0" encoding="GBK"?>
<app-config code="PROXY" name="proxy-server">
	<app-parameter>
		<proxy-service-port value="xxxxx"/>
		<!--
		<ssl-cacert-file value="xxx.crt"/>
		<ssl-privatekey-file value="xxx.key"/>
		-->
   </app-parameter>
   <moudle-parameter>
	<log-level value="LOG_ERROR"/>
	<log-write-mode value="CONSOLE_ONLY"/>
  </moudle-parameter>
</app-config>

服务端配置:

<?xml version="1.0" encoding="GBK"?>
<app-config code="PROXY" name="proxy-server">
	<moudle-parameter>
		<log-level value="LOG_ERROR"/>
		<log-write-mode value="CONSOLE_ONLY"/>
		<app-name value="DiskStation" />
		<app-description value="DiskStation smarGate" />
		<user-audit value="xxxxxxxxxxxxx:y"/>
	</moudle-parameter>
	<channel address="服务器IP:端口" ssl="false" />
</app-config>

PS: 代理服务器从我一开始用的时候是可以的,大概3月份的时候的版本,最近跟进更新,才发现不能启动了。

另外手机上的访问点和描述都不正常,只显示
访问点:network entry.
描述:common entry of intern net.

ios客户端能有吗

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

可以在 OpenWRT 上安装吗?

家里是一个软路由,安装了 OpenWRT 系统,系统里面安装了一个网盘,想实现内网穿透,这样在任何地方都可以访问网盘了。
不知道要怎么在 OpenWRT 中安装使用呢?
谢谢!

开机启动需要设置延时,否则无法使用

树莓派设置开机运行smarGate,需要设置延时启动,否则会失败。
尝试了rc.local脚本和systemd,不设置延时的话,显示已经运行,但实际上无法使用。猜测可能跟默认服务器的通信有关。

能开发支持openwrt吗?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

希望增加手机的服务端

我家的电脑由于不会一直开着,所以,如果有Android的服务端,闲置的手机就可以用上了,当然,能增加路由器的服务端就更好了,比如梅林固件就觉得自己很需要。

客户端可以请求root权限了,作者给解释一下呗。

是不是快能映射smb了?
另外之前的版本映射ftp成功了,使用的被动模式,但有些许问题,filezilla会卡在mlcd时错误,服务端局域网是没有问题的,flashfxp可以登录,但是传文件卡在100%的地方且强制结束后文件错误。
我是被动模式映射了5个数据端口和ftp端口。

另外最近一黑屏客户端就退出了,电池模式什么的设置无效,手机上只有webview最近升级过。

配置的私有代理服务器无法生效

请问大佬为啥我的私有代理服务器无法生效,网络端口都没问题,是配置文件的问题吗
代理服务器配置:

<?xml version="1.0" encoding="GBK"?>
<app-config code="PROXY" name="proxy-server">
	<app-parameter>
		<proxy-service-port value="9001"/>
		<!-- -->
		<ssl-cacert-file value="server.crt"/>
		<ssl-privatekey-file value="server.key"/>
	</app-parameter>
	<moudle-parameter>
		<log-level value="LOG_ERROR"/>
		<log-write-mode value="CONSOLE_ONLY"/>
	</moudle-parameter>
</app-config>

windows服务器配置

<?xml version="1.0" encoding="GBK"?>
<app-config code="PROXY" name="proxy-server">
	<moudle-parameter>
		<log-level value="LOG_ERROR"/>
		<log-write-mode value="CONSOLE_ONLY"/>
		<app-name value="company" /><!-- need replace -->
		<app-description value="try it" /><!-- need replace -->
		<user-audit value="#########:3"/><!-- need replace and must is numeric-->
	</moudle-parameter>
	<channel address="公网ip:9001" ssl="true" />
</app-config>

手机上把官方代理关掉就连不上了

不太清楚我理解的对不对,请教使用方法。

我现在在云服务器上开启了服务端模式,手机上也成功连接了。看到了云服务器上线了。目前的想法是把手机的adb调试功能映射到服务器上去。路由指向写的127.0.0.1:5555 本地端口写了1234
然后通过手机的adb查看手机确实打开了1234和5555端口。但是云服务器上这两个端口都没有上线。我应该怎样通过云服务器来连接安卓机器的5555端口呢?readme的说明对这一块没有看太懂,还烦请指教一下。谢谢。

关于通过代理上网情况下的使用

我遇到这样的情况:服务器所在网络是通过http代理连接外网的,就是需要设置IE全局代理才能上外网,请问smarGate可以增加此种方式的连接功能吗?谢谢

MIUI11 android8.0下大概率闪退,用户无法升级webview日志

Describe the bug
MIUI11 android8.0下大概率闪退,用户无法升级webview

To Reproduce
Steps to reproduce the behavior:

  1. 自动登录后闪退日志如下:
    2019-10-14 21:57:12App Version: 1.01_1OS Version: 8.0.0_26Vendor: XiaomiModel: MI 5s PlusCPU ABI: arm64-v8aarmeabi-v7aarmeabijava.util.IllegalFormatConversionException: f != java.lang.Integerat java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4402)at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2897)at java.util.Formatter$FormatSpecifier.print(Formatter.java:2844)at java.util.Formatter.format(Formatter.java:2523)at java.util.Formatter.format(Formatter.java:2458)at java.lang.String.format(String.java:2770)at com.smarGate.MainActivity.setStatus(MainActivity.java:774)at com.smarGate.MyTimeTask.run(MainActivity.java:59)at java.util.TimerThread.mainLoop(Timer.java:555)at java.util.TimerThread.run(Timer.java:505)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

最近版本ipv6优先的问题

假设我的服务器是群晖,客户端为win10,打开wifi和手机在同一局域网

群晖是有ipv6的,且为fullcone
win10没有ipv6,但也是fullcone

此时,手机打开客户端后,不能使用p2p连接,只能中转。

但是如果把群晖的ipv6关掉后,就可以p2p连接了,问题就出在这里

手机关掉wifi,然后4g,是可以ipv6直通的。

正常来说两边fullcone的话,是完全可以p2p打通的,是不是有点过于依赖ipv6了。

正常情况下,不应该是如果检测不到ipv6,就利用服务器打洞吗?

另外测试过frp,xtcp是可以通p2p的,但是因为udp qos的关系,长时间传输会断掉。

楼主编一个Armbian 的客户端吧

可以考虑用GO+WEBGUI

手机屏幕长亮撑不住

现在各种随身带的电视盒子 矿渣都能刷armbian了,

所以如果有arm版会很方便。

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.