Giter Site home page Giter Site logo

ishadowsocksr's Introduction

GPLv3 License

iShadowsocksR

公告

iShadowsocksR 已经支持新协议 overTLS.

目前支持 SSRoT 特性 的 iOS 客户端 已经开发完毕, 出于种种原因不能释出。

Screen Shot 2020-05-22 at 18 14 21

身在大陆以外的苹果软件开发者, 可以 将此 App 编译成 ipa 文件后电邮发送至 [email protected] ——虽然机率极小,也不能放弃希望不是? ——作者会将该文件放在这里供用户下载. 然后通过 AltStore 安装到用户的(非越狱)手机里, 就可以使用了.

Important

Please read this first before you do anything with this project.
In short, you need to respect to license of the project. You cannot copy the source code and publish to App Store.


What is it?

iShadowsocksR is an iOS client that implements custom proxies with the leverage of Network Extension framework introduced by Apple since iOS 9.

Currently, iShadowsocksR is compatible with following proxies:

Subscribe Telegram Channel to get updates of Potatso.
Join Telegram Group to chat with users.

Original Author: @icodesign
Swift 3 Maintainer: @haxpor with this site
Current Maintainer: @ssrlive

Project Info

iShadowsocksR has in total 25 (2 as submodules dependencies as used as local file in Cocoapod) dependencies as following

  • 15 Cocoapod dependencies
  • 10 submodules dependencies

The project is tested with Xcode 14.3 (14E222b) on iOS 16.4.1 (20E252) device with cocoapod version 1.12.1+. If you experienced an expected issue, try to use those versions, if still experience the problem please file the issue.

Compilation environment

  • macOS Ventura 13.3.1 (22E261)
  • Xcode Version 14.3 (14E222b)

Install Rust build tools to support compiling overTLS

  • Install Xcode Command Line Tools: xcode-select --install
  • Install Rust programming language: curl https://sh.rustup.rs -sSf | sh
  • Install iOS target support: rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios
  • Install cbindgen tool: cargo install cbindgen

How to Build

Perform the following steps to be able to build the project. Be warned that you should not call pod update as newer version of pod frameworks that iShadowsocksR depends on might break building process and there will be errors.

git clone --recurse-submodules https://github.com/ShadowsocksR-Live/iShadowsocksR.git
cd iShadowsocksR
sudo gem install cocoapods
pod install                                # pull down dependencies into our project

Then open iShadowsocksR.xcworkspace with Xcode to Build and Run the project. Done.

Troubleshooting

  • If you are a China mainland developer, maybe you should set your git with proxy, such as SOCKS5 etc., or you can not pull some submodules because of GFW. Like this:

    # Enable Proxy settings
    git config --global http.proxy socks5://127.0.0.1:1080
    git config --global https.proxy socks5://127.0.0.1:1080
    
    # Disable Proxy settings
    git config --global --unset-all http.proxy
    git config --global --unset-all https.proxy
    
  • You must have an Apple Developer account with an annual fee of $99.

  • To compile the app running on your iOS device smoothly, you must search the project for the com.ssrlive.issr identifier string and replace it with your own identifier string.

  • Build apple iOS/macOS xcframework: see overtls for more details.

    cd overtls
    
    ./build-apple.sh
    
  • If you meet lots of compiling errors such as ld: file not found: /.../libarclite_iphoneos.a, please change all of iOS deployment target from iOS 8.0 to iOS 11.0 or above. like this: image

How To Contribute

Clone the project, make some changes or add a new feature, then make a pull request.

Acknowlegements

We use the following services or open-source libraries. So we'd like show them highest respect and thank for bringing those great projects:

Services

Open-source Libraries

Also we'd like to thank people that helped with the project

Donate

Notice

Read more from here.

Support Us

The development covers a lot of complicated work, costing not only money but also time. These are the way to support

License

You cannot just copy the project, and publish to App Store. Please read this first.

--

To be compatible with those libraries using GPL, we're distributing with GPLv3 license.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ishadowsocksr's People

Contributors

alsojin0806 avatar haxpor avatar icodesign avatar so898 avatar ssrlive avatar willbin avatar youngsing avatar yousong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ishadowsocksr's Issues

运行./build-libssl.sh这步没成功

openssl git:(bc0adc8) ./build-libssl.sh

Build options
OpenSSL version: 1.0.2l
Architectures: x86_64 i386 arm64 armv7s armv7 tv_x86_64 tv_arm64
iOS SDK: 11.4
tvOS SDK: 11.4
Number of make threads: 8
Build location: /Users/David/Desktop/FQ/iShadowsocksR/Library/openssl

Using openssl-1.0.2l.tar.gz
Building openssl-1.0.2l for iPhoneSimulator 11.4 x86_64...
Logfile: /Users/David/Desktop/FQ/iShadowsocksR/Library/openssl/bin/iPhoneSimulator11.4-x86_64.sdk/build-openssl-1.0.2l.log
Configure...
Patching Makefile...
Make (using 8 thread(s))...
Problem during make - Please check /Users/David/Desktop/FQ/iShadowsocksR/Library/openssl/bin/iPhoneSimulator11.4-x86_64.sdk/build-openssl-1.0.2l.log

log的结果

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive member: ../../libcrypto.a(ec_key.o) size too large (archive member extends past the end of the file)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed
make[2]: *** [lib] Error 1
make[1]: *** [subdirs] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build_crypto] Error 1

target闪退:unrecognized selector sent to instance和EXC_BAD_ACCESS

配置ss后,打开代理。
播放爱奇艺等视频客户端时候,(播放一会儿后)会出现unrecognized selector sent to instance

截屏2020-05-30 下午6 25 30
截屏2020-05-30 下午6 25 02

有时候也会出现EXC_BAD_ACCESS

截屏2020-05-30 下午6 35 01
EXC_BAD_ACCESS出现的位置有时候在方法头部,有时候在尾部,有时候在中间

每次都会出现上面两个问题之一

Snapchat 无法使用

global-mode 为1 的情况下无法发送消息(其实软件本身发送消息是不需要翻墙的),global-mode为0即可。问题应该出在TCP

连接微信、telegram、WhatsApp不稳定。

偶尔能连接上,偶尔连接不上这些软件,很奇怪,线路没有问题,另一台安卓设备一直在连接。

打印日志,发现如下错误。

image
image

NFO(tun2socks): 00003 (157.240.15.54:5222 192.0.2.1:52505): client_recv_func client received (4096)
INFO(tun2socks): 00003 (157.240.15.54:5222 192.0.2.1:52505): client closed

DEBUG(BSocksClient): received reply rest
DEBUG(BReactor): Got already expired timers

是否支持acl文件

我在local.c中增加bypass-china.acl配置文件, 发现没有效果, baidu.com还是不能直连, 是什么原因呢

int ssr_local_main_loop(const struct server_config *config, const char * _Nullable aclpath, void(*feedback_state)(struct ssr_local_state *state, void *p), void *p) {
    
    if (aclpath != NULL && strlen(aclpath) != 0) {
        acl = !init_acl(aclpath);
    }

规则不管用

在国外,看爱奇艺视频, 打开视频发现视频显示地理限制无法观看,
配置**服务器后,添加规则如下:
DomainMatch, iqiyi, Proxy

发现没有起作用,有什么解决的办法吗?

整理一下目前自己编译遇到的坑和解决方法

整理一下目前遇到的问题、以及解决方法:

1、WhatsApp无法连接, DNS被污染了,可以自己建立一个dns,然后指定这个试试,我这是这样解决的。

2、WhatsApp、微信等无法发送“大(超过5s)”视频,有概率发送失败,因为sslocal发送数据的时候,发生黏包现象,自行简单处理一下就行了。

3、无法语音、视频,项目上还没有支持UDP的转发,自己改一下,支持UDP转发就行了。

4、代理规则在浏览器中生效,但是在一些应用的ip包中不生效,正在解决。

5、无法连接Snapchat,没找到问题 😢。

欢迎大家一起交流解决问题。

SSR可以连接成功,但是启动SSROT就无法访问

请教个问题大佬,首先我是down的最新代码,SSR可以连接成功,但是启动SSROT就无法访问。
服务器上nginx我看到的访问日志是没有数据过来的。

image
上面图片红色部分是启动SSROT访问的,数据没有过来,下面部分是我用vmess访问的(可以成功,nginx应该没有配置错误)。

ssrot配置图:
image

nginx配置图
image

ssr配置服务监听的是10025
image

请问是我哪里弄错了吗,直接是用SSR倒是可以连接上并且有数据返回。

UDP超时处理错误

建议这样写
[self.udpSocket sendData:outData toHost:destHost port:ntohs(udphdr->dest) withTimeout:-1 tag:0];//443

有几个奇怪的bug想提问下

都是有关ssr-native这个后端的。
第一个就是测速会有瓶颈30Mbps左右,别家软件能跑满(开代理的情况)
第二就是speedtest上传测速的时候,上传到一般显示测速错误。可能跟之前有人说明的ins和youtube上传也相关。
第三个就是直连的时候也是跑不满宽带,200Mbps只能跑到100Mbps,别家没有问题。
希望大佬能解决下,谢谢

where is http.xxx save code?

The app begin run,I found the http.xxx file will write to APPGroup.but i find noting code to save http.xxx file.

关于 iOS Socks5 设置一个疑问。

iOS 的 NetworkExtension 里是没有 Socks5 设置的,只有 http proxy 和 https proxy 这两个设置。
并不像 macOS 使用 networksetup 可以设置 socks5 proxy。
那么应用层如何发送 socks5 的包给 PacketTunnel,然后 PacketTunnel 再转发给远端服务器?
我在使用 NetworkExtension 的过程中,只收到 HTTP CONNECT 的包,并没有收到 socks5 的包。

运行./build-libssl.sh 这步报错了

打印日志如下:

/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch x86_64 -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fembed-bitcode -miphoneos-version-min=7.0 -arch x86_64 -O3 -DL_ENDIAN -Wall -c -o obj_err.o obj_err.c
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch x86_64 -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fembed-bitcode -miphoneos-version-min=7.0 -arch x86_64 -O3 -DL_ENDIAN -Wall -c -o obj_xref.o obj_xref.c
ar r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
ar: ar: creating archive ../libcrypto.a
../../libcrypto.a: Inappropriate file type or format
make[2]: *** [lib] Error 1
make[1]: *** [subdirs] Error 1
make[1]: *** Waiting for unfinished jobs....
test -z "" || ar r ../libcrypto.a fipscanister.o
/usr/bin/ranlib ../libcrypto.a || echo Never mind.
make: *** [build_crypto] Error 1

运行程序崩溃

根据说明配置完成,但是进入主界面后点击选择代理,或者4个界面切换后回到首页就会,难道是那里配置错了,但确定id等根据说明来的呀!
1
3
2

老铁,开启vpn却无法联网

老铁,首先感谢你能提供个能成功开启vpn的版本,我这个ssr服务器账号在mac在用的,添加到potatso后,在开启vpn却无法联网,这是怎么处理好呢?

WhatsApp 无法使用

44B1D2D4E5CF883E993AAF364B6399E3

https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_adb.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_top500_banlist_ad.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_top500_banlist.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_top500_whitelist_ad.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_top500_whitelist.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_backcn_ad.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_backcn.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_cnip_ad.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_cnip.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_direct_banad.conf
https://raw.githubusercontent.com/XWJACK/PotatsoConfig/master/potatso/sr_proxy_banad.conf

添加了代理规则 还是 无法使用,whatsApp 一直提示 '连接中...'

Build 过程中 API.swift 文件异常

在进行Build过程中,在API.swift中提示两处异常。小白有点不知道怎么办,求大佬帮忙看下可以嘛~ 感激不尽。

/GitHub/iShadowsocksR2/Potatso/Core/API.swift:65:12: Initializer for conditional binding must have Optional type, not '[Rule]'

/GitHub/iShadowsocksR2/Potatso/Core/API.swift:255:20: Initializer for conditional binding must have Optional type, not '[T]'

另外之前在build时 Cartography 也有异常,手动修改了pod中的版本后就没有提示了。。。 Xcode版本 9.3 9.2都有试过了~ 谢谢

打包后代理失败

我真机调试 加密方式选chacha20 协议选auth_aes128_md5 混淆选tls1.2_ticket_auth 能正常打开外网。打包发布之后 这配置 网页打开 报错。但是我把配置改成 rc4-md5 origin plain 能正常访问。什么原因 求助!!!

[Feature Request] SSR没有Protocol Param

终于编译成功,但是发现并没有提供SSR Protocol Param的设置
原版之前的shadowsocks-libev库确实比较老,不支持各种参数和加密方式
但是这个版本所有库都是最新的了,是可以支持Protocol Param的,不知大神有没有兴趣加上?

Geoip 设置无效

如题,设置GeoIp cn DIRECT无效,其他的action也无效,求大佬回答一下

Telegram无法被代理(疑似tun2socks问题)

大佬好,不好意思又打扰了。之前看到大佬您说2018年tg更新过代码就用不了了,我试了下APP Store随机的一个V。P。N,别家的ssr软件(小火箭)都可以正常连接(不用设置代理)。所以很好奇是不是tun2socks的问题。
img_0726

Utils/Receipt.m 编译到最后报错

Utils/Receipt.m 编译到最后报错。
Mac 10.14.5 (18F132)
Xcode Version 10.1 (10B61)
pod 1.7.3
执行过libssl.sh了,全盘改过id了。最后编译报这个,不太会,感谢大佬指点问题在哪

Implicit declaration of function 'OpenSSL_add_all_digests'
Implicit declaration of function 'EVP_cleanup'

./build-libssl.sh --version=1.1.0f

Build options
OpenSSL version: 1.1.0f
Targets: ios-sim-cross-x86_64 ios-sim-cross-i386 ios64-cross-arm64 ios-cross-armv7s ios-cross-armv7 tvos-sim-cross-x86_64 tvos64-cross-arm64
iOS SDK: 12.1
tvOS SDK: 12.1
Number of make threads: 8
Configure options: no-deprecated
Build location: /Users/maji/Documents/git/iShadowsocksR/Library/openssl

Downloading openssl-1.1.0f.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5154k 100 5154k 0 0 571k 0 0:00:09 0:00:09 --:--:-- 798k
Building openssl-1.1.0f for iPhoneSimulator 12.1 x86_64...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/iPhoneSimulator12.1-x86_64.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for iPhoneSimulator 12.1 i386...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/iPhoneSimulator12.1-i386.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for iPhoneOS 12.1 arm64...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/iPhoneOS12.1-arm64.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for iPhoneOS 12.1 armv7s...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/iPhoneOS12.1-armv7s.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for iPhoneOS 12.1 armv7...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/iPhoneOS12.1-armv7.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for AppleTVSimulator 12.1 x86_64...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/AppleTVSimulator12.1-x86_64.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Building openssl-1.1.0f for AppleTVOS 12.1 arm64...
Logfile: /Users/maji/Documents/git/iShadowsocksR/Library/openssl/bin/AppleTVOS12.1-arm64.sdk/build-openssl-1.1.0f.log
Configure...
Make (using 8 thread(s))...
Build library for iOS...
Build library for tvOS...

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.