remove invalid IP rule

This commit is contained in:
True Zhuanjia
2024-09-02 22:46:24 +08:00
parent dcdfbc7394
commit d2a1add105
4 changed files with 2 additions and 23 deletions
@@ -579,16 +579,7 @@ static NSMutableSet* hostList;
[alertController addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Cancel"] style:UIAlertActionStyleCancel handler:nil]];
[alertController addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
NSString* hostAddress = [((UITextField*)[[alertController textFields] objectAtIndex:0]).text trim];
//handles public IP
NSString *publicIpBackdoor = @"-666";
if ([hostAddress rangeOfString:publicIpBackdoor].location != NSNotFound) {
hostAddress = [hostAddress stringByReplacingOccurrencesOfString:publicIpBackdoor withString:@""];
[DiscoveryManager setBackdoorHostAddress:hostAddress];
} else {
[DiscoveryManager setBackdoorHostAddress:nil];
}
[self showLoadingFrame:^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
[self->_discMan discoverHost:hostAddress withCallback:^(TemporaryHost* host, NSString* error){
@@ -733,7 +733,7 @@ const int FrontViewPositionNone = 0xff;
// tested on iOS17. this method does not call back on iOS14, runtime orientation limitation not working for iOS14. Probably depends on iOS16 or higher.
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
// Return the supported interface orientations based on the current state
NSLog(@"supportedInterfaceOrientations called back 666");
// NSLog(@"supportedInterfaceOrientations called back 666");
//lock the orientation accordingly after streaming is started
DataManager* dataMan = [[DataManager alloc] init];
Settings *currentSettings = [dataMan retrieveSettings];