SSR 科学上网 IMAP 代理失效解决方案

in cn •  7 years ago 

前言


最近…… 很忙很忙很忙很忙很忙很忙很忙很忙……

在进行紧张的 SAT 培训,我也不知道为什么我一个 Freshman 要开始准备美国高考,但我确实在准备。

最近只能是佛系更新了。

为什么我开始写 SSR 了


回国之后一直欧没有找到好的解决方案,所以只好自己搭建了一个 SSR 用于高速的科学上网(传送门

但是开始使用后发现有商机可乘,就开始卖起了 SSR,给自己赚点零花钱。向外销售之后遇到了很多问题,顺便写篇博客讲下遇到最奇葩的一个问题并且讲一讲解决方案。

SSR 原理


SSR,即 ShadowsocksR,基于 SS(Shadowsocks,影梭),加上了更强的混淆机制。

photo.jpg

在一台海外服务器上搭建完一套 SSR 服务后,实现原理即是本地主机访问海外服务器,海外服务器代替下载请求,并传回本机。比如:我现在在国内,需要访问谷歌,于是我链接了我在美国的服务器,让它帮我访问谷歌,下载数据,再让它发给我。这样,我就不需要亲自访问谷歌,而是让我在美国的亲戚帮忙访问,再转告我。

这样,就实现了高速稳定的科学上网。

问题所在


一天,我查着邮件,突然,我的 Apple Mail Client 提示我:无法连接到 Gmail 服务器

这下头痛了,开始排查问题:

  1. gmail.com 可以访问,服务器没毛病
  2. 断开重连,可以收信,没问题
  3. 过了一会儿又出现了……

我……??我使用的是 PAC 模式(Proxy Auto Configure),可以自动分配国内外流量,我怀疑是 PAC 自动把 IMAP 服务器当作国内流量了,于是……

  1. 将 imap.gmail.com 加入 PAC 白名单
  2. 仍然出现……
  3. 关闭 PAC
  4. 还是出现……

好像不是 PAC 的问题…… 这时候我注意到,手机端的收信一直没有问题,只有电脑端有

揭开谜团


我手机端的客户端是把 SSR 当作 VPN 来代理的,而电脑端直接是 SSR 协议。而 SSR 协议只能代理 http 等,并不支持 IMAP 服务。

所以当我用客户端收信时会发生错误,但是 Gmail 网页版就没事。最后在电脑上加上 Proxifier 强制全局代理就没事了。

最后


15 号培训结束,回归正常更新,尽情期待。

如有科学上网需求,或者愿意支持我,欢迎订阅服务

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I found your post because @freedomshift featured you in a contest where I'm one of the judges. You're a very intelligent young man I'd say. I was a high school English teacher in Canada for years, so I understand your SAT prep...the rest of your most, not so much haha

Oh thank you for your appreciation! Well, the way we Chinese prepare for SAT is a little bit different from that of American students lol

Posted using Partiko iOS

hahaha @coder-bts, that's for sure! I think the Canadian students fall somewhere in between 😅

https://www.tipsforchina.com/how-to-setup-a-fast-shadowsocks-server-on-vultr-vps-the-easy-way.html

Warning

Setting up your own shadowsocks server can offer very fast speeds compared to a VPN, but there are some disadvantages that you should know about.

Privacy and anonymity. One of the best features of using a good VPN service is that you are using a shared IP address, which makes it very difficult for your internet activities to be traced back to you (assuming your VPN provider doesn't keep activity logs and enough users are sharing the same IP address). However, using a VPS will give you a static IP address that belongs only to you. This makes it very easy for your internet activity to be traced back to you. If you download materials protected by copyright, your VPS provider will likely ban your account after receiving a DCMA notice. Or, if a government agency provides evidence of illegal activity originating from your IP address, you may find yourself in big trouble.

Limited support. With a VPN, all of your traffic is tunneled over the VPN. However, proxies don't work for all types of traffic (Adobe Flash, for example, will bypass all proxies and use your ISP connection directly). Proxies also don't work in all programs, it will only work in programs that have proxy settings or use the system proxy.

The best solution to improve your speed and solve both of the above problems is to tunnel a VPN connection over your shadowsocks proxy.

Thank you for your advice! Surely a static ip is a big problem, but I have thousands of different changeable ip. And I will be keeping on eye on it. My vps provider does not store personal info btw.

Posted using Partiko iOS, join the beta testing program here

You are certainly very talented! But, you need someone who understands the downside of this kind of business to keep you out of trouble ...

Yes that I do..

Posted using Partiko iOS

Hey @coder-bts - how are you?

I have featured you in the pay it forward contest, again:

https://steemit.com/payitforward/@freedomshift/my-entry-to-curation-contest-week-15-of-paying-it-forward

Welcome back!

Oh that’s very nice! I am recently very busy and gonna be back to steemit after 15th.

Posted using Partiko iOS, join the beta testing program here

  ·  7 years ago 

bts好久没出现了

  ·  7 years ago 

建议踩回小学重新读一遍

是啊,我现在的生活是:

  • 每天 7小时半 课程
  • 每天两套 OG 模考
  • 每天 200 个单词
  • Essay 联系
  • 每天 3 杯咖啡
  • 每天一瓶啤酒

根本没时间更新文章

每天一瓶啤酒 - bad idea ...

i do it not because i want to

  ·  7 years ago 

未成年还喝啤酒!

  ·  7 years ago 

踩回去吧!

白天咖啡支撑,晚上需要酒精快速入睡

  ·  7 years ago 

这样很不健康的

  ·  7 years ago 

没必要这么拼吧,我要是这种作息就已经傻掉了。

what is OG 模考? I am not able to find it from Google.

OG stands for Official Guide releases by College Board for SAT

Posted using Partiko iOS

Thank you for telling me. What are you a "freshman" of (grade ?)?

Mostly the first year of high school or college

Posted using Partiko iOS

So, you are a freshman in high school then? Are you back to NC / USA?
It is very early to prepare for SAT but it's a good thing.

is this your website? your own business?

https://billts.net/

Yes, it is!

Posted using Partiko iOS, join the beta testing program here

is your business incorporated? How are you protected from any liability or legally?

Having a website business based on subscription has gotten very complicated. And, this sort of business has "legs" ...

uggg, have to say "no". it is not really justified commercial event..

not really justified commercial event

you might have to tell that to a judge ...

As a young person, you have a lot to loose.

How do I know?

Life teaches "you" and I have learned from those who lost everything for seemingly minute things ...

V2了解下!

Just came over from the #payitforward contest. Looks like you are very talented and have a great future ahead.

I came to your post because @freedomshift featured you post in the Pay it Forward (PIFC) curation contest. I am one of the judges and wish you luck