Git Product home page Git Product logo

haxpor / potatso Goto Github PK

View Code? Open in Web Editor NEW
2.0K 92.0 1.4K 28.85 MB

Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework. ***This project is unmaintained, try taking a look at this fork https://github.com/shadowcoel/shadowcoel instead.

License: GNU General Public License v3.0

Ruby 0.38% Objective-C 19.92% Swift 79.71%
shadowsocks shadowsocks-client china network proxy client ios ss ssr

potatso's People

Contributors

haxpor avatar icodesign avatar so898 avatar willbin 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  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

potatso's Issues

App Crash When Start

2017-06-08 15:41:39.898059 Potatso[1213:549997] *** Assertion failure in -[MMWormholeFileTransiting checkAppGroupCapabilities], /Users/yi/Downloads/Potatso/Pods/MMWormhole/Source/MMWormholeFileTransiting.m:62
2017-06-08 15:41:39.898270 Potatso[1213:549997] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App Group Capabilities may not be correctly configured for your project, or your appGroupIdentifier may not match your project settings. Check Project->Capabilities->App Groups. Three checkmarks should be displayed in the steps section, and the value passed in for your appGroupIdentifier should match the setting in your project file.'
*** First throw call stack:
(0x18e4191b8 0x18ce5055c 0x18e41908c 0x18eed102c 0x100fe4c10 0x100fe4a34 0x100fe2ca4 0x101e78440 0x101e6bed8 0x101e6bd90 0x101e6b958 0x101e6b920 0x102855218 0x102856048 0x101e6b998 0x100132dd4 0x100132f8c 0x100e4f4ec 0x100e4f5dc 0x100e4f6ec 0x100e4f164 0x100e4f8bc 0x1943406a4 0x194550a98 0x194556808 0x19456b104 0x1945537ec 0x18ffef92c 0x18ffef798 0x18ffefb40 0x18e3c6b5c 0x18e3c64a4 0x18e3c40a4 0x18e2f22b8 0x1943397b0 0x194334534 0x1000effc4 0x18d2d55b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

SS项目运行后貌似数据包有问题

wechatimg1
wechatimg2
我的SS服务器使用libev 3.0.7, MacOS上的client连接正常,但是在iOS上跑的时候发现请求都失败了,看上去像是数据包错乱了? 不知道可能是什么原因谢谢了

swift compiler Error

Xcode Version:8.3.3 Swift Version:3

At Potatso/Base/Row/RequestEventRow.swift line 14
Type RequestEventRow does not conform to protocol 'RowType'
Type RequestEventRow does not conform to protocol 'Taggable'
Type RequestEventRow does not conform to protocol 'TypedRowType'
Type RequestEventRow does not conform to protocol 'BaseRowType'
Generic type 'Row' specialized with too many type parameters(got 2,but expected 1)

At Potatso/Base/RequestEventRow.swift line 17
'super' members cannnoe be referenced in a root class

At Potatso/Base/RequestEventRow.swift line 18
Use of unresolved idenyifier 'displayValueFor'

And the same errors happend in Potatso/Base/Row/ProxyRow.swift,it look like swift version error.

"Failed to save configuration" with Xcode9

The log said:

[NEVPNManager saveToPreferenc:337 Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 "permission denied" UserInfo={NSLocalizedDescription=permission denied}

Only happens when using Xcode9 to compile.
In Xcode8 it will show "add vpn" pop-up.

abount pod install problem .

I made a pod installation ,but in the end there are the following tips, can not run normally app, whether I set the problem? Can you check it for me? THANKS

`Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 27 dependencies from the Podfile and 27 total pods installed.

[!] The Potatso [Debug] target overrides the LIBRARY_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Potatso [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Potatso [Debug] target overrides the SWIFT_VERSION build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Potatso [Release] target overrides the LIBRARY_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Potatso [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The Potatso [Release] target overrides the SWIFT_VERSION build setting defined in Pods/Target Support Files/Pods-Potatso/Pods-Potatso.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PacketTunnel [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PacketTunnel/Pods-PacketTunnel.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PacketTunnel [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PacketTunnel/Pods-PacketTunnel.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The TodayWidget [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-TodayWidget/Pods-TodayWidget.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The TodayWidget [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-TodayWidget/Pods-TodayWidget.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoLibrary [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoLibrary/Pods-PotatsoLibrary.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoLibrary [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoLibrary/Pods-PotatsoLibrary.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoModel [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoModel/Pods-PotatsoModel.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoModel [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoModel/Pods-PotatsoModel.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoLibraryTests [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoLibraryTests/Pods-PotatsoLibraryTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

[!] The PotatsoLibraryTests [Release] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in Pods/Target Support Files/Pods-PotatsoLibraryTests/Pods-PotatsoLibraryTests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)flag, or - Remove the build settings from the target.

运行报错问题

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App Group Capabilities may not be correctly configured for your project, or your appGroupIdentifier may not match your project settings. Check Project->Capabilities->App Groups. Three checkmarks should be displayed in the steps section, and the value passed in for your appGroupIdentifier should match the setting in your project file.'
时不时出现,我添加了3个证书了。
总是出现这个问题大家有没有遇到的。

clock_gettime(CLOCK_MONOTONIC, &ts) crashed

Hello, I checked out the project and try compile and run. The app runs successfully but can't connect to SS server. After debugging, I found the TunnelProvider network extension always crashes at clock_gettime(CLOCK_MONOTONIC, &ts), which is at BTime.h, in BTime_Init(). After use the alternative code path of using gettimeofday, SS server is successfully connected. I test in a iTouch of iOS 9.3.5. Do you think the gettimeofday code path is OK or is there a way to fix the crash of clock_gettime? Thanks!

Add ipv6 support

Hey @haxpor,

would it be possible to add ipv6 support?

Ty for the swift3 version btw. :)

Best,

Chris

Should add more logs when connecting VPN

I have config my own app id and run this project on my device, but after configuring one proxy and tapping 'connect', the VPN config in 'Settings - VPN' was added, but the VPN connect failed, and no related logs show in Xcode console.

So please make a config document to check my config is right or not, or add more logs to track the connect process.

Thanks.

build failed

error meesage:
/Potatso/Library/ShadowPath/ShadowPath/shadowsocks-libev/src/rule.h:46:5: Unknown type name 'pcre'

step:
1.manual clone git submodules;
2.run pod install;
3.run carthage update;
4.build;

env:
macOS 10.12.5
Xcode 8.3.3
pod 1.1.1
carthage 0.23.0

The request of 'https://api.potatso.com/rulesets' returns 404.

{ URL: https://api.potatso.com/rulesets/detail } { status code: 404, headers { "Content-Length" = 9; "Content-Type" = "text/plain; charset=utf-8"; Date = "Wed, 05 Apr 2017 07:02:54 GMT"; Server = "nginx/1.11.10"; "x-response-time" = 0ms; } }) fatal error: unexpectedly found nil while unwrapping an Optional value

And this leads an fatal error.

What's happening?

compile failed

Fetching podspec for Aspects from ./Library/Aspects/
Fetching podspec for ICSMainFramework from ./Library/ICSMainFramework/
[!] Unable to integrate the following embedded targets with their respective host targets (a host target is a "parent" target which embeds a "child" target like a framework or extension):

  • Potatso (3.0) and PacketProcessor () do not use the same Swift version.
  • Potatso (3.0) and PacketTunnel () do not use the same Swift version.
  • PotatsoLibraryTests () and PotatsoLibrary (3.0) do not use the same Swift version.

[!] There are duplicate dependencies on SwiftColor in Podfile:

  • SwiftColor (~> 0.3.7)
  • SwiftColor

cannot connect to ss after installed the Potatso app

Hi,

Thanks for your migration to Swift 3 of this project. :-) I followed the README.md file and successfully built and installed the Potatso app on my device. But the connection cannot be established. The scenario is that after I added the SS proxy and clicked the "Connect" button in the bottom, nothing happened just like I didn't click the button at all. The VPN config "Potatso" is created on the System Settings of iOS but there is no VPN icon showing connected on the top status bar.

I didn't find any logs which may have any clues in the Xcode log window. Do you have any idea? Thanks.

项目无法编译

你们确定都能在swift3可以编译么?总是编译错误999+,都是版本版本不兼容,导致引入模块失败

xcode 9 issue

Error Domain=NEConfigurationErrorDomain Code=10 "permission denied"

这个报错是语法问题吗,swift才接触不久

API.SWIFT 类

var rules: [Rule] = []
if let parsedObject = Mapper().mapArray(JSONArray: rulesJSON as! [[String : Any]]){
rules.append(contentsOf: parsedObject)
}

报错 :initiallzer for conditional binding must have Optional type ,not '[Rult]'

if let parsedObject = Mapper().mapArray(JSONArray: JSONToMap as! [[String : Any]]){
return .success(parsedObject)
}

报错 :initializer for conditional binding must have Optional type .not [T]

UDP packet sent by potatso is polluted in 32bit device.

To test the UDP packet forwarding func of potatso, I write a simple UDP client to send a simple string data "123" to our UDP server at outside network. The UDP server just echo what I send. So, I send "123" and will get "123" back. I tested the server when VPN is not actived, it's OK, and then I test potatso's UDP forwarding by connect vpn from potatso, and run the test udp client in the same device.

When test in ios10, everything is OK. I get "123" from server. And when test in ios9, I get "\0\u{0B}b\u{19}123". And from the log of UDP server, I can see the packet sent has already been polluted, so I think the problem is taken place when forwarding udp pakcet by potatso.
Because when test in iOS10, there is no this problem, so I think potatso has something to deal with in iOS9. I will take a deep research on it, but I need you advice. Thanks!

edit:
I has found the real reason and fixed it. It is a bug in potatso code and it is relative to the pointer length in 32bit or 64bit device.
(And I has changed the issue title)
In handleUDPPacket, these two lines has a mistake, which should compute the UDP header length but give the length of the pointer (there should not be a * ):
data = data + sizeof(struct udp_hdr *); data_len -= sizeof(struct udp_hdr *);
In my test device of ios9, which is a iTouch with A5 CPU, which is a 32 bit, the sizeof here is 4, but the udp header length is 8, and in another test device, iPhone7 with CPUA7, the pointer is 8 bit so these device goes right but this is just by chance the pointer lenght equal to the udp header length.
So to fix it, I provide the code:
int udp_h_len = sizeof(struct udp_hdr); data = data + udp_h_len; data_len -= udp_h_len;

When build,shadowsocks-libev/libipset/set/inspection.c not found

no such file or directory: '/work_studio/demo_iosproxy/Potatso-Utility/Library/ShadowPath/ShadowPath/shadowsocks-libev/libipset/set/inspection.c'

Then I pull new version of shadowsocks-libev https://github.com/shadowsocks1/shadowsocks-libev
Then build,it error:
clang: error: no such file or directory: '/work_studio/demo_iosproxy/Potatso-Utility/Library/ShadowPath/ShadowPath/shadowsocks-libev/src/tls1.2_ticket.c'
clang: error: no input files

I found a version with tls1.2_ticket.c
https://github.com/shadowsocks-plus/shadowsocks-libev

build it error:
unknown type name obfs

Who can help me? Thanks

PacketTunnel can not get Potatso.sharedGroupIdentifier

when PacketTunnel is running, it can not get correct Potatso.sharedGroupIdentifier.

Here is the file and code:

PotatsoManager.m

  • (NSString *) sharedGroupIdentifier {
    return [NSString stringWithFormat:@"group.%@", [[NSBundle mainBundle] bundleIdentifier]];
    }

Error about git submodule update --init

Run the fitst step "git submodule update --init " , my result is this
Please make sure you have the correct access rights and the repository exists. fatal: clone of '[email protected]:phimage/CallbackURLKit.git' into submodule path '/Users/zt/Documents/WorkSpace/Potatso/Library/CallbackURLKit' failed Failed to clone 'Library/CallbackURLKit'. Retry scheduled Cloning into '/Users/zt/Documents/WorkSpace/Potatso/Library/Eureka'... Permission denied (publickey). fatal: Could not read from remote repository.

App Couldn't connect to it's vpn

I've pulled last version of app and went through all steps successfully !
But when i build app on my device and add server to it , when i press connect button it rounds and nothing happens and it remains connect again !
I've bought the original app from Appstore and it works with my server!
What should i do after creating App IDs and creating provisions and adding to project !?
** the github app successfully create it's own VPN on iPhone but can't connect to it .

Confidential.h file not found

I've gone through the ReadMe file to install the required dependencies and installed those dependencies, however "Confidential.h" is still missing in the code with the error "Confidential.h file not found". Please provide the required file or steps to fix the issue.

iOS10.3.2 Can't connect VPN

@haxpor @so898

Xcode version 8.3(8E162)
iOS version 10.2.3
iPhone mode : iphone 6 plus
macOS version : 10.12.4 (16E195)

the sharedGroupIdentifier was changed, but was can't connect vpn

img_0709
2017-06-11 9 07 12

getSystemDNS Problem on switching networks

Hello @haxpor,

so it looks like Potatso (and also your fork) has an issue within the DNS function. It fetches the DNS servers from the system. You can check the code within the packettunnelprovider.m. On network changes, like disconnecting from or connecting to WiFi, this function still gets the saved DNS addresses which it got on the initial start. Lets say you turn on potatso on a network with DNS 127.0.0.1 and in the meantime you connect to X different networks it still be using the first saved DNS, in that case 127.0.0.1. Also iverriding system DNS with hardcoded DNS like the ones from google is not solving that issue. Using custom DNS wont work because of the tun2socks extension which only talks through TCP, it does not support UDP.

Regarding that bug its not possible to use any other App without having a problem!

I am willing to pay soneone who can fix that problem! (either it will restart the tunnel on network changes or the getting system function DNS will work)!

Best,

Chris

Catch error ld: framework not found YAML

编译遇到的问题:
Showing All Errors Only
ld: framework not found YAML
解决:carthage update to pull down dependencies into Carthage/Checkouts folder and build each one
cp -r /private/tmp/YAML.dst/Library/Frameworks/YAML.framework /work_studio/demo_iosproxy/Potatso/Carthage/Build/iOS/

其他:
/bin/sh -c /Users/huanghuorong3/Library/Developer/Xcode/DerivedData/Potatso-bdcpkqtqpyzuytccejfcmrmhxhkj/Build/Intermediates/Potatso.build/Debug-iphonesimulator/PacketTunnel.build/Script-1EB5EF321E0314BE000C7748.sh

/Users/huanghuorong3/Library/Developer/Xcode/DerivedData/Potatso-bdcpkqtqpyzuytccejfcmrmhxhkj/Build/Intermediates/Potatso.build/Debug-iphonesimulator/PacketTunnel.build/Script-1EB5EF321E0314BE000C7748.sh: line 2: /usr/local/bin/carthage: No such file or directory

/usr/local/bin/carthage 是什么?Pod的一个依赖管理插件
安装carthage:https://github.com/Carthage/Carthage

进入Potatso目录,执行 carthage update

我的无法编译运行呢。

pod install 后
Fetching podspec for Aspects from ./Library/Aspects/
Fetching podspec for CallbackURLKit from ./Library/CallbackURLKit
[!] No podspec found for CallbackURLKit in ./Library/CallbackURLKit
求指点啊。

vpn does not work in iOS 10.3.2?

after update my iphone system to 10.3.2, the network is unavailable when i connect vpn with potatso. everything is alright before 10.3.2.

vpn does not work

i have config ss proxy,then tap connect button,but show nothing,the topbar of iphone does not show vpn icon

推荐一下,已完工的产品: Banana

Support SS SSR:

  1. SS ALL

  2. SSR protocol:
    "origin",
    "verify_simple",
    "auth_simple",
    "auth_sha1",
    "auth_sha1_v2",
    "auth_sha1_v4",
    "auth_aes128_md5",
    "auth_aes128_sha1"
    "auth_chain_a"
    " auth_chain_b "
    " auth_chain_c "
    " auth_chain_d "
    " auth_chain_e "
    " auth_chain_f "

  3. 混淆obfs:
    "plain",
    "http_simple",
    "http_post",
    "tls1.2_ticket_auth"

  4. 加密方式:
    "none",
    "table",
    "rc4",
    "rc4-md5-6",
    "rc4-md5",
    "aes-128-cfb",
    "aes-192-cfb",
    "aes-256-cfb",
    "aes-128-ctr",
    "aes-192-ctr",
    "aes-256-ctr",
    "aes-256-gcm (暂不支持)",
    "bf-cfb",
    "camellia-128-cfb",
    "camellia-192-cfb",
    "camellia-256-cfb",
    "cast5-cfb",
    "des-cfb",
    "idea-cfb",
    "rc2-cfb",
    "seed-cfb",
    "salsa20",
    "chacha20",
    "chacha20-ietf"

Aslo Support : UDP转发,TCP Over UDP,TCP Fast Open , DNS 转发

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.