ursachec / CPAProxy

A thin Objective-C wrapper around Tor.
Other
160 stars 49 forks source link

.onion sites don't seem to work. #35

Open kjrose opened 8 years ago

kjrose commented 8 years ago

The documentation isn't entirely clear how to call .onion sites, but when I do try to do them directly through the proxy it fails. Is there a special method for doing .onion with CPAProxy?

rainwolf commented 8 years ago

It works for me using the example in the readme with the code below:

            NSURL *URL = [NSURL URLWithString:@"https://facebookcorewwwi.onion/"];
            NSURLSessionDataTask *dataTask = [urlSession dataTaskWithURL:URL
                                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                                if(error == nil)
                                                                {
                                                                    NSString * text = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
                                                                    NSLog(@"Data = %@",text);
                                                                }

                                                            }];
            [dataTask resume];