一半君的总结纸

听话只听一半君

openshift 正向翻墙备忘录

多挖几个坑备用

  1. 首先注册帐号,这好像没什么好备忘的
  2. 然后安装OpenShift Client tools 简称rhc , lz是centos 7.2, 官方步骤
    sudo gem install rhc
    
  3. 然后开始配置,按提示一步一步完成
    $ rhc setup
    OpenShift Client Tools (RHC) Setup Wizard
    
    This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.
    
    If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for OpenShift Online: openshift.redhat.com.
    Enter the server hostname: |openshift.redhat.com| 
    

    之后就可以拿ssh登陆了,但是有段时间不用的话就会

     This gear has been temporarily unidled. To keep it active, access your app @ http://python-xxx.rhcloud.com/
    

    如果能连上,说明配置正确,只要在本机这样就行了

    ssh -D 1080 ?????@python-xxx.rhcloud.com
    

    然后你在firefox里选用本地socks5代理就可以了

  4. 想试试看shadowsocks行不行,网上搜的都说不行,
    [python-xxx.rhcloud.com ???]\> pip install shadowsocks
    Requirement already satisfied (use --upgrade to upgrade): shadowsocks in ./app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages
    Cleaning up...
    
    然后试试看
    ssserver -p 8888 -k yeahppp -m aes-256-cfb
    2016-04-17 17:26:56 INFO     loading libcrypto from libcrypto.so.10
    2016-04-17 17:26:56 INFO     starting server at 0.0.0.0:8888
    Traceback (most recent call last):
      File "/var/lib/openshift/???/python/virtenv/bin/ssserver", line 9, in <module>
        load_entry_point('shadowsocks==2.8.2', 'console_scripts', 'ssserver')()
      File "/var/lib/openshift/???/python/virtenv/lib/python2.7/site-packages/shadowsocks/server.py", line 68, in main
        tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
      File "/var/lib/openshift/???/python/virtenv/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 582, in __init__
        server_socket.bind(sa)
      File "/opt/rh/python27/root/usr/lib64/python2.7/socket.py", line 224, in meth
        return getattr(self._sock,name)(*args)
    socket.error: [Errno 13] Permission denied
    

    喔… 那还是用上面的ssh的方式吧,如果在windows下操作比较繁琐,要用putty

ps: openshift/heroku上可以装 shadowsocks-heroku,但是我想用我的自动翻墙路由器(shadowsocks-libev),所以没有试这个

参考:

Openshift – Remote Connection (SSH)

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: