Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问下大佬,如果想用geoip的话,应该怎么配置? #2

Open
noahge opened this issue Mar 7, 2018 · 7 comments
Open

问下大佬,如果想用geoip的话,应该怎么配置? #2

noahge opened this issue Mar 7, 2018 · 7 comments

Comments

@noahge
Copy link

noahge commented Mar 7, 2018

No description provided.

@danielfree
Copy link
Owner

我在路由器上没有跑起来带 geoip 的版本,内存不大够用,可以尝试先增加内存再用新的 v2ray 包在路由器上运行看能不能正常运行

@dnvcupid
Copy link

dnvcupid commented Apr 9, 2018

大佬,问一下,你意思是直接安装新的版本默认就会使用geoip的意思吗

@noahge
Copy link
Author

noahge commented Apr 9, 2018

我的路由器是r7000,装最新的版本默认就是geoip,我用的是路由器代理的模式,就是在v2ray配置文件里路由input里设定一个端口,协议改成http,然后局域网内需要用外网的设备设置代理即可,这样v2ray就会用geoip来区分是国内ip还是国外ip,国外ip会转发到vps进行解析。最开始我发现v2ray服务总是用一段时间(大概一天左右),就开始无限重启,几乎就不能正常运行,把路由器重启后可以再用一天左右,后来发现是alterid的问题,把alterid改小一点,我用的是16,就可以解决这个问题,我的路由器现在大概一周重启一次,还算比较稳定,以上是我的经验,供参考。

@danielfree
Copy link
Owner

danielfree commented Apr 9, 2018

@dnvcupid 新版本默认使用 geoip,我之前实验的结果是程序根本跑不起来,我估计用 SD 卡划分 swap 内存的方法应该是可以运行的。
@jackge0323 感谢分享!根据官方文档 https://www.v2ray.com/chapter_03/01_effective.html#alterid 个人使用是可以调小一点,总而言之 v2ray 本身是比较耗资源的,你重启路由器实际上是清空缓存降低了内存消耗,我记得有个命令可以直接操作。我是用脚本不断监控 v2ray 进程本身是否退出然后重新启动,像你的这种情况,我觉得可以定期用脚本主动 kill 掉 v2ray 进程再启动一次,应该也可以达到效果。

@dnvcupid
Copy link

dnvcupid commented Apr 9, 2018

geoip模式不能连接上就直接自动翻墙吗,设备还需要设置代理?发现目前梅林装v2ray的就只有这个方案完美的,支持原版梅林,之前发现另一个,要需要基于k版梅林和ss基础上,大佬是不是可以更新弄一下那监控脚本,还有安装文档能详细点就好了,大佬的文档小白很难懂

@danielfree
Copy link
Owner

@dnvcupid geoip 本身是做分流,你说的设备是自己的手机或者 pc 的话,用类似我这样的方法设置之后是自动翻墙的,不需要代理。

@dnvcupid
Copy link

dnvcupid commented Apr 11, 2018

{
"log":
{
"loglevel": "warning"
},
"inbound":
{
"port": 1099,
"listen": "0.0.0.0",
"protocol": "socks",
"settings":
{
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
}
},
"inboundDetour": [
{
"protocol": "dokodemo-door",
"domainOverride": ["tls", "http"],
"listen": "0.0.0.0",
"port": 1080,
"settings":
{
"address": "",
"network": "udp,tcp",
"timeout": 0,
"followRedirect": true
}
}],
"outbound":
{

    "protocol": "vmess",
    "settings":
    {
        "vnext": [
        {
            "address": "1.1.1.1",
            "port": 38685,
            "users": [
            {
                "id": "51efaf4f-d7d5-473a-a873-3ff100dd1455",
                "alterId": 32,
                "security": "auto"
            }]
        }]
    },
    "mux":
    {
        "enabled": true
    }
},
"outboundDetour": [
{
    "protocol": "freedom",
    "settings":
    {},
    "tag": "direct"
}],
"dns":
{
    "servers": [
        "8.8.8.8",
        "8.8.4.4",
        "localhost"
    ]
},
"routing":
{
    "strategy": "rules",
    "settings":
    {
        "domainStrategy": "IPIfNonMatch",
        "rules": [


            {
                "type": "chinasites",
                "outboundTag": "direct"
            },
            {
                "type": "field",
                "ip": [
                    "0.0.0.0/8",
                    "10.0.0.0/8",
                    "100.64.0.0/10",
                    "127.0.0.0/8",
                    "169.254.0.0/16",
                    "172.16.0.0/12",
                    "192.0.0.0/24",
                    "192.0.2.0/24",
                    "192.168.0.0/16",
                    "198.18.0.0/15",
                    "198.51.100.0/24",
                    "203.0.113.0/24",
                    "::1/128",
                    "fc00::/7",
                    "fe80::/10"
                ],
                "outboundTag": "direct"
            },
            {
                "type": "chinaip",
                "outboundTag": "direct"
            }
        ]
    }
},
"transport":
{
    "tcpSettings":
    {
        "connectionReuse": true
    }

}

}

我都不清楚我的是什么模式,config文件是这样,自动翻墙,还有设置了swap感觉没什么用,free查看swap利用一直是0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants