Coder Social home page Coder Social logo

Comments (5)

clowwindy avatar clowwindy commented on April 26, 2024

Just use the libshadowsocks target:

image

from shadowsocks-ios.

portwatcher avatar portwatcher commented on April 26, 2024

I sent you this mail last night and I guess this mail is in your dustbin since you are using Gmail and my mail domain is customized:

抱歉这么晚打搅你,希望没能影响你观看世界杯。

我是今天在github上向你请教如何把shadowsocks整合进我自己的项目中的人。
按照你的指示,我已经将libshadowsocks添加进了我的项目中,现在它看起来像这样:

image

这里我编译了一遍,没有任何问题,因为我没有用到任何你的代码。

之后,我将你的AppProxyCap和ShadowsocksRunner进行了封装,封装在自己的ShadowsocksManager这个类中。但是在编译时却出了compile errors。

image

以下是我已经尝试的解决方案:

  • 将systemconfiguration.framework等框架添加进了主项目中
  • 在Library Search Paths和User Header Search Paths中添加了shadowsocks-iOS项目所在的目录

我没有尝试将AppProxyCap.m和ShadowsocksRunner.m添加进Compile Sources中,因为这两个文件当前不在我的项目目录中,虽然这两个文件所在的shadowsocks.xcodeproject出现在了我的项目目录中。如果我将这两个文件又手动添加进我的项目,那和我之前一个一个源码添加有何区别呢。

我今年大二,之前js写的比较多,还是一名iOS开发新手。有做的不对的地方还请不吝赐教!抱歉占用你宝贵的时间!

from shadowsocks-ios.

clowwindy avatar clowwindy commented on April 26, 2024

你看一下 ShadowsocksRunner 可能不在 libshadowsocks 项目里,你可以自己写一个或者把代码复制过去。

from shadowsocks-ios.

portwatcher avatar portwatcher commented on April 26, 2024

果然不在libshadowsocks里,加上之后。还要在自己的项目中包含libev/AppProxyCap/Shadowsocks/才行。

现在能成功编译也不会报错了,但是我用目前的public server会访问不了墙外的网站,直接运行模拟器或者是iphone上的shadowsocks-iOS也是一样无法访问。会报如下错误:

getpeername: Invalid argument

CFNetwork SSLHandshake failed (-9806)

换成自己电脑正在正常使用的server时,会出现如下报错,同时也访问不了墙外网站:

Connecting mobile.twitter.com

remote recv: Connection reset by peer

CFNetwork SSLHandshake failed (-9806)

NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)

可能是因为:

  • 客户端libev?
  • 服务器shadowsocks-nodejs版本不符,与客户端加密方式不同?
  • openssl ?(我使用的是pod search openssl结果中的openssl)
  • 我哪里做得不对?(我没有使用polipo,因为我只需要application-wide proxy)

抱歉再次占用你宝贵的时间。

from shadowsocks-ios.

portwatcher avatar portwatcher commented on April 26, 2024

解决了,是加密方式不匹配,改成匹配的就ok了。

这问题弄了两个下午了,解决了有点小兴奋啊 :-)

from shadowsocks-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.