@@ -41,6 +41,9 @@ @interface ViewController () <UINavigationControllerDelegate, UIImagePickerContr
4141
4242@implementation ViewController
4343
44+ #define kUploadFixHost00 @" up-z0.qbox.me"
45+ #define kUploadFixHost01 @" upload.qbox.me"
46+
4447- (void )viewDidLoad {
4548 [super viewDidLoad ];
4649 [QNLogUtil setLogLevel: QNLogLevelInfo];
@@ -62,15 +65,15 @@ - (IBAction)uploadAction:(UIButton *)sender {
6265 path = [[NSBundle mainBundle ] pathForResource: @" image.png" ofType: nil ];
6366 path = [[NSBundle mainBundle ] pathForResource: @" image.jpg" ofType: nil ];
6467 path = [[NSBundle mainBundle ] pathForResource: @" UploadResource_6M.zip" ofType: nil ];
65- path = [[NSBundle mainBundle ] pathForResource: @" UploadResource_9M.zip" ofType: nil ];
68+ // path = [[NSBundle mainBundle] pathForResource:@"UploadResource_9M.zip" ofType:nil];
6669// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_49M.zip" ofType:nil];
6770// path = [[NSBundle mainBundle] pathForResource:@"UploadResource_1.44G.zip" ofType:nil];
6871
6972// NSFileManager *manager = [NSFileManager defaultManager];
7073// NSURL *desktopUrl = [manager URLsForDirectory:NSDesktopDirectory inDomains:NSUserDomainMask].firstObject;
7174// path = [desktopUrl URLByAppendingPathComponent:@"pycharm.dmg"].path;
7275
73- [self uploadImageToQNFilePath: path index: 0 ];
76+ // [self uploadImageToQNFilePath:path index:0];
7477 [self uploadImageToQNFilePath: path complete: nil ];
7578 [self changeUploadState: UploadStateUploading];
7679#else
@@ -116,7 +119,7 @@ - (void)uploadImageToQNFilePath:(NSString *)filePath index:(NSInteger)index {
116119
117120- (void )uploadImageToQNFilePath : (NSString *)filePath complete : (dispatch_block_t )complete {
118121
119- kQNGlobalConfiguration .isDnsOpen = NO ;
122+ // kQNGlobalConfiguration.isDnsOpen = NO;
120123// kQNGlobalConfiguration.connectCheckEnable = false;
121124 kQNGlobalConfiguration .dnsCacheMaxTTL = 600 ;
122125 kQNGlobalConfiguration .partialHostFrozenTime = 20 *60 ;
@@ -130,14 +133,14 @@ - (void)uploadImageToQNFilePath:(NSString *)filePath complete:(dispatch_block_t)
130133 QNConfiguration *configuration = [QNConfiguration build: ^(QNConfigurationBuilder *builder) {
131134 builder.timeoutInterval = 90 ;
132135 builder.retryMax = 1 ;
133- builder.useHttps = NO ;
136+ // builder.useHttps = NO;
134137
135138 builder.useConcurrentResumeUpload = true ;
136- // builder.concurrentTaskCount = 6 ;
139+ builder.concurrentTaskCount = 3 ;
137140 builder.resumeUploadVersion = QNResumeUploadVersionV1;
138141 builder.putThreshold = 4 *1024 *1024 ;
139- // builder.chunkSize = 1*1024*1024;
140- // builder.zone = [[QNFixedZone alloc] initWithUpDomainList:@[@"up-z0.qbox.me", /*@"upload.qbox.me"*/ ]];
142+ builder.chunkSize = 1 *1024 *1024 ;
143+ builder.zone = [[QNFixedZone alloc ] initWithUpDomainList: @[kUploadFixHost00 , kUploadFixHost01 ]];
141144 builder.recorder = [QNFileRecorder fileRecorderWithFolder: [NSHomeDirectory () stringByAppendingPathComponent: @" Documents" ] error: nil ];
142145 }];
143146
@@ -310,9 +313,15 @@ - (void)alertMessage:(NSString *)message{
310313 item.ipValue = @" 180.101.136.19" ;
311314 item.sourceValue = @" custom" ;
312315 [array addObject: item];
313- } else if ([host containsString: @" up-z0.qbox.me " ]) {
316+ } else if ([host containsString: kUploadFixHost00 ]) {
314317 DnsItem *item = [[DnsItem alloc ] init ];
315318 item.hostValue = host;
319+ item.ipValue = @" 220.181.38.148" ;
320+ item.sourceValue = @" custom" ;
321+ [array addObject: item];
322+
323+ item = [[DnsItem alloc ] init ];
324+ item.hostValue = host;
316325 item.ipValue = @" 180.101.136.28" ;
317326 item.sourceValue = @" custom" ;
318327 [array addObject: item];
0 commit comments