Nintendo Switch 联网加速的一种姿势 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
masir
V2EX    Nintendo Switch

Nintendo Switch 联网加速的一种姿势

  •  
  •   masir 2019-10-14 20:38:29 +08:00 14804 次点击
    这是一个创建于 2190 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近 switch 上有了狂野飙车,但是在酒店的网络死活连不上。刚好朋友的 switch 想用舞力全开 unlimited 也不行,就天天试着各种方法。

    开始就想着花钱用各种加速器,但是出差只带了公司的电脑,各种限制,电脑上开了各种加速器之后,根本没法共享给 switch然后转战淘宝,发现有卖代理服务器的,就是给你个 IP+Port,先买个 1 块的试了试,下东西是很快,但是还是没法登陆狂野飙车,顺便看了下卖家给的服务器 IP 是美帝的。

    然后想着能不能找个香港的服务器会好些,于是刚刚自己买了个阿里云国际的轻应用服务器,3.5$,搭建好之后,NAT 类型变成了 B,测速是 20Mbps 左右,几个朋友一起用,还是很合算的。

    下面写下搭建过程,希望能帮得上有需要的人。如果有啥写错的,请轻喷~

    #教程基于 CentOS

    1.安装 Squid 并修改配置:

    yum install squid -y cp /etc/squid/squid.conf /etc/squid/squid.conf.bak vi /etc/squid/squid.conf 

    我的配置文件,主要是修改端口和添加认证信息:

    # # Recommended minimum configuration: # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT # # Recommended minimum Access Permission configuration: # # Deny requests to certain unsafe ports #http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports #http_access deny CONNECT !SSL_ports # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager # We strongly recommend the following be uncommented to protect innocent # web applications running on the proxy server who think the only # one who can access services on "localhost" is a local user #http_access deny to_localhost # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # # Example rule allowing access from your local networks. # Adapt localnet in the ACL section to list your (internal) IP networks # from where browsing should be allowed #http_access allow localnet http_access allow localhost # And finally deny all other access to this proxy #http_access deny all # Squid normally listens to port 3128 #http_port 3128 # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /var/spool/squid 100 16 256 # Leave coredumps in the first cache dir coredump_dir /var/spool/squid # # Add any of your own refresh_pattern entries above these. # refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 #用户认证文件的位置 auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd auth_param basic realm proxy acl authenticated proxy_auth REQUIRED http_access allow authenticated #http 代理的端口,默认为 3128 http_port 12306 acl OverConnLimit maxconn 16 #定义每个 IP 最大允许 16 个连接,防止攻击 

    2.然后配置用户,为了安全:

    先安装 httpd

    yum install httpd* -y 

    添加用户:

    htpasswd -c /etc/squid/passwd <username> #然后输入密码。 

    重启 Squid 并启用开机启动:

    systemctl restart squid systemctl enable squid 

    3.测试:

    先在 VPS 上本地测试下:

    curl --proxy 127.0.0.1:PORT --proxy-user <username>:<password> http://www.baidu.com 

    如果有返回的话,应该就是 OK 了。

    然后可以从其它 Linux 上测试下,记得在 VPS 管理的地方防火墙放通自己定义的 PORT:

    curl --proxy <服务器 IP>:PORT --proxy-user <username>:<password> http://www.baidu.com 

    然后 Switch 只需要在连接 wifi 的地方配置好代理服务器 IP + PORT + User + Password,就能用了。

    不保证每个地区都好用,具体的网络还是跟当地的情况有很大关系。阿里云这个机器带宽是 30M,我现在在杭州,网络是电信,测速有 20Mbps 左右,sShop 下载的时候,从服务器侧看,带宽跑到 17M 左右;朋友在重庆,测速只有 6Mbps,但是可以正常缓冲出舞力全开的在线歌曲。

    Ps.也欢迎大家讨论其他更好用的方法。

    16 条回复    2024-07-22 08:58:32 +08:00
    0ZXYDDu796nVCFxq
        1
    0ZXYDDu796nVCFxq  
       2019-10-14 21:07:34 +08:00 via Android
    然而经过 gfw 的 http 代理,用不了几天就会被封
    chocolatesir
        2
    chocolatesir  
       2019-10-14 23:47:58 +08:00 via Android   1
    头像加急的一楼讲得对。你带了电脑直接开$,勾选允许局域网设备连接即可。
    billytom
        3
    billytom  
       2019-10-15 01:35:34 +08:00
    这个不就是很多很多年前的 http 大力吗?最多 48 小时应该就倒了吧
    masir
        4
    masir  
    OP
       2019-10-15 01:52:43 +08:00 via Android
    @chocolatesir 自己电脑可以这样,带的公司干活的电脑试过这么搞不行,一堆各种安全软件,不然也不愿意这么搞啊。在家是直接路由器上搞定的
    1daydayde
        5
    1daydayde  
       2019-10-15 08:06:27 +08:00
    你这等于给送经验
    akvo
        6
    akvo  
       2019-10-15 08:30:58 +08:00 via Android
    弄个树莓派,直接跑个透明代理就能让网络质量到 A 了
    (不过在电脑上用 surge 做网关就是 F,看反馈 Mellow 也有这个现象)
    heqiaokyou
        7
    heqiaokyou  
       2019-10-15 08:31:19 +08:00
    建议随身带个路由器,路由器上装好威批恩+UDP 类加速工具。
    masir
        8
    masir  
    OP
       2019-10-15 10:03:29 +08:00
    @heqiaokyou 是的啊,昨天刚买,正在路上~
    locoz
        9
    locoz  
       2019-10-15 10:47:18 +08:00
    墙:你这是看不起我?
    masir
        10
    masir  
    OP
       2019-10-15 12:58:05 +08:00 via Android
    natsji
        11
    natsji  
       2019-10-24 15:14:26 +08:00 via Android
    路由器酸酸乳然后给 switch 开全局加速
    marcosteam
        12
    marcosteam  
       2019-10-29 08:47:13 +08:00 via Android
    lean 的 lede 自带游戏加速模式,找个支持 UDP 转发的机场就行了
    Frannk
        13
    Frannk  
       2019-11-10 15:36:52 +08:00
    你这个是 HTTP 代理 按理来说不能提升 NAT 类型,因为 UDP 不走这个代理。你确定提升了 NAT 类型吗?
    kamui0523
        14
    kamui0523  
       2020-03-19 15:12:20 +08:00
    你在网络连接时设置的 http 代理只能加速 eshop,无法联机吧
    kamui0523
        15
    kamui0523  
       2020-03-19 15:13:28 +08:00
    @Frannk 我试过 NAT 类型会变成 A,但实际联机是连不上的,没用.....加速 eshop 效果还可以,但还是比 UU 加速差很多.
    我现在想研究下 Mellow 之类的做 UDP 代理加速
    molezznet
        16
    molezznet  
       2024-07-22 08:58:32 +08:00
    @0ZXYDDu796nVCFxq 这种如果设置成 https 呢? 我看 squid 是支持的
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1347 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 27ms UTC 23:59 PVG 07:59 LAX 16:59 JFK 19:59
    Do have faith in what you're dong.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86