forked from ChatSecure/ChatSecure-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better Tor account creation and tor integration
- Loading branch information
1 parent
90a592c
commit b6f8ef0
Showing
12 changed files
with
173 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// OTRDomainCellInfo.h | ||
// ChatSecure | ||
// | ||
// Created by David Chiles on 10/22/14. | ||
// Copyright (c) 2014 Chris Ballinger. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface OTRDomainCellInfo : NSObject | ||
|
||
//Better display name for the server or orginization | ||
@property (nonatomic, strong, readonly) NSString *displayName; | ||
|
||
//The domain that should be appended to the username may differ from domain in some cases such as TOR | ||
@property (nonatomic, strong, readonly) NSString *usernameDomain; | ||
|
||
//The server domain to connect to | ||
@property (nonatomic, strong, readonly) NSString *domain; | ||
|
||
|
||
+ (instancetype) domainCellInfoWithDisplayName:(NSString *)displayName usernameDomain:(NSString *)usernameDomain domain:(NSString *)domain; | ||
|
||
+ (NSArray *)defaultDomainCellInfoArray; | ||
+ (NSArray *)defaultTorDomainCellInfoArray; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// | ||
// OTRDomainCellInfo.m | ||
// ChatSecure | ||
// | ||
// Created by David Chiles on 10/22/14. | ||
// Copyright (c) 2014 Chris Ballinger. All rights reserved. | ||
// | ||
|
||
#import "OTRDomainCellInfo.h" | ||
|
||
@interface OTRDomainCellInfo () | ||
|
||
@property (nonatomic, strong) NSString *displayName; | ||
@property (nonatomic, strong) NSString *domain; | ||
@property (nonatomic, strong) NSString *usernameDomain; | ||
|
||
@end | ||
|
||
@implementation OTRDomainCellInfo | ||
|
||
- (instancetype) initWithDisplayName:(NSString *)displayName usernameDomain:(NSString *)usernameDomain domain:(NSString *)domain | ||
{ | ||
if (self = [self init]) { | ||
|
||
self.domain = domain; | ||
|
||
if ([displayName length]) { | ||
self.displayName = displayName; | ||
} else { | ||
self.displayName = domain; | ||
} | ||
|
||
if ([usernameDomain length]) { | ||
self.usernameDomain = usernameDomain; | ||
} else { | ||
self.usernameDomain = domain; | ||
} | ||
|
||
|
||
} | ||
return self; | ||
} | ||
|
||
+ (instancetype) domainCellInfoWithDisplayName:(NSString *)displayName usernameDomain:(NSString *)usernameDomain domain:(NSString *)domain | ||
{ | ||
return [[self alloc] initWithDisplayName:displayName usernameDomain:usernameDomain domain:domain]; | ||
} | ||
|
||
+ (NSArray *)defaultDomainCellInfoArray | ||
{ | ||
return @[[self domainCellInfoWithDisplayName:@"Dukgo" usernameDomain:nil domain:@"dukgo.com"], | ||
[self domainCellInfoWithDisplayName:@"Computer Chaos Club" usernameDomain:nil domain:@"jabber.ccc.de"], | ||
[self domainCellInfoWithDisplayName:@"The Calyx Institute" usernameDomain:nil domain:@"jabber.calyxinstitute.org"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"jabberpl.org"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"rkquery.de"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"xmpp.jp"] | ||
]; | ||
} | ||
+ (NSArray *)defaultTorDomainCellInfoArray | ||
{ | ||
return @[ | ||
[self domainCellInfoWithDisplayName:@"The Calyx Institute" usernameDomain:@"jabber.calyxinstitute.org" domain:@"ijeeynrc6x2uy5ob.onion"], | ||
[self domainCellInfoWithDisplayName:@"Computer Chaos Club" usernameDomain:@"jabber.ccc.de" domain:@"okj7xc6j2szr2y75.onion"], | ||
[self domainCellInfoWithDisplayName:@"Dukgo" usernameDomain:nil domain:@"dukgo.com"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"jabberpl.org"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"rkquery.de"], | ||
[self domainCellInfoWithDisplayName:nil usernameDomain:nil domain:@"xmpp.jp"] | ||
]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.