标签 telegram 下的文章

说明:telegram的mtproto最近挂得很快,搜索了下发现用国内机子中转下,同时找到了inner-ss。下面是国内小鸡上的操作,国外的酸酸正常使用的情况。
不仅仅电报可以用,老毛子固件的transocks应该也行,配合gfwlist

1.下载自己服务器对应的版本 https://github.com/ihciah/inner-shadowsocks/releases
2.上传到服务器目录下/root/inner-ss/ 只是举例,按自己实际情况
3.编辑config.json

{
  "listen": "0.0.0.0",
  "port": 23333, #socks5的端口
  "auth": false, #认证默认关闭
  "username": "ihc", #用户名
  "password": "iah", #密码
  "servers": ["ss://RC4-MD5:pass1@ip1:port1", "ss://RC4-MD5:pass2@ip2:port2"], #酸酸服务器
  "maxfail": 3,
  "recovertime": 600,
  "starttimeout": 3,
  "remotetimeout": 120,
  "insidetimeout": 120,
  "whitelistenable": false,
  "whitelistdomains": [".telegram.org"],
  "whitelistips": ["::/0", "0.0.0.0/0", "91.108.4.0/22", "91.108.8.0/22", "91.108.56.0/22", "109.239.140.0/24", "149.154.160.0/20", "149.154.164.0/22", "2001:67c:4e8::/48"]
}

4.开机启动后台运行(Debian8)
vi /etc/rc.local
在"exit 0"前添加一行
nohup /root/inner-ss/inner-ss -c /root/inner-ss/config.json > /dev/null 2>&1 &
给权限
chmod +x /etc/rc.local

1.小米路由器r2d中 使用 mt工具箱3.0 的gfwlist模式,telegram不能直接连接。

2.当前通过netpeeker软件看到的IP如下:

ipset add gfwlist 91.108.56.110
ipset add gfwlist 91.108.56.163
ipset add gfwlist 149.154.175.50
ipset add gfwlist 149.154.167.50
ipset add gfwlist 149.154.175.100
ipset add gfwlist 149.154.167.51
ipset add gfwlist 149.154.166.120

3.修改工具箱中ss脚本
vi /etc/misstar/applications/ss/script/ss
添加到start函数末尾

start()
{
#此处为添加的内容
/etc/init.d/dnsmasq restart
}

4.给权限
chmod +x /etc/misstar/applications/ss/script/ss

image

参考:
https://laoyur.com/archives/267
https://gist.github.com/lanceliao/3099caed8750911dfe58

2019年6月28日更新
尝试了一下新的mtg
Github:https://github.com/cutelua/mtg-dist
Github:https://github.com/9seconds/mtg

安装
bash <(wget -qO- https://git.io/mtg.sh)

卸载

systemctl stop mtg && systemctl disable mtg
rm -f /usr/local/bin/mtg /lib/systemd/system/mtg.service /etc/mtg.conf

参考:https://sunpma.com/151.html

--------------分割线-------------

mt工具箱里的科学上网不智能,gfwlist模式很多网站都无效,暂时没找到解决办法。最近开始用的telegram也不能愉快的聊天,有现成工具就搭了个mtproto

逗逼一键脚本

#CentOS 7 / Debian 7+ / Ubuntu 14.04 + 
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/mtproxy.sh && chmod +x mtproxy.sh && bash mtproxy.sh

阿里云centos7亲测失败,顺便贴个错误日志,Debian8成功安装

[信息] 开始安装/配置 依赖...
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No packages marked for update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package zlib-devel-1.2.7-17.el7.x86_64 already installed and latest version
Package git-1.8.3.1-14.el7_5.x86_64 already installed and latest version
Package net-tools-2.0-0.22.20131004git.el7.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
cp: ‘/usr/share/zoneinfo/Asia/Shanghai’ and ‘/etc/localtime’ are the same file
[信息] 开始下载/安装...
Cloning into 'MTProxy'...
remote: Enumerating objects: 183, done.
remote: Total 183 (delta 0), reused 0 (delta 0), pack-reused 183
Receiving objects: 100% (183/183), 293.80 KiB | 281.00 KiB/s, done.
Resolving deltas: 100% (74/74), done.
cc  -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"f9158e3129efd4ccdc291aefb840209791226a77\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -iquote common -iquote . -c -MP -MD -MF dep/mtproto/mtproto-proxy.d -MQ objs/mtproto/mtproto-proxy.o -o objs/mtproto/mtproto-proxy.o mtproto/mtproto-proxy.c
make: cc: Command not found
make: *** [objs/mtproto/mtproto-proxy.o] Error 127
[错误] MTProxy 编译失败!
另外,如果在上面几行看到 xxxxx option "-std=gnu11" 字样,说明是系统版本过低,请尝试更换系统重试!
rm -rf objs dep objs/bin || true

image

参考:https://doub.io/shell-jc7/