English 中文(简体)
如何在目标c中确定代用配置
原标题:How to set the proxy configuration in objective c

I am a newbie to objective c. I am developing a mac application which include several network communication. Usually I am posting data to our data center using direct internet connection. I would like to do the same using local proxy connection. Can I do this using NSURLConnection? if not can you please let me know the correct method to connect send and receive data using proxy connection?

问题回答

<代码>NSURLConnection将自动使用代用系统环境。 你们不需要做任何事情来做到这一点。

你们可以利用亚洲旅游业协会的框架这样做。

您可从以下网址下载框架。

http://allseeing-i.com/ASIHTTPRequest/

Sample code to post data via proxy.

ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:fullURL];


    [request setProxyHost:proxyIP];

    [request setProxyPort:proxyPort];

    [request setProxyUsername:proxyUserName];

    [request setProxyPassword:.proxyPassword];

    [request appendPostData:theBodyData];

    [request startSynchronous];




相关问题
How to change firefox proxy from webdriver?

how can I access Firefox proxy settings from Python Webdriver and change them to make Firefox use modified proxy settings without needing to restart it?

Regex Proxy Server

I control access via a proxy server and run some regex on every request. For prototype I have used curl, regex and php. Obviously this will not put up with any serious load. Can anyone suggest and ...

Specify a Proxy in config vs code for a WSE/SOAP web service

Is there a way to specify a WSE3 proxy in the config file instead of code. I figured out how to get it working in code as follows: valservice.Proxy = new System.Net.WebProxy("http://10.192.xx.xx:...

Accessing a git repository via ssh behind a firewall

I would like to access (clone/push/pull) a private (via ssh) git repository while behind a corporate firewall that only allows http proxy access. I have written a robust Java (daemon) program (based ...

Set proxy data for an app

I have a few .NET apps which use the HttpWebRequest. My gut says i can create a config or manifest file and set the proxy data in there and .NET will automatically load it. But i dont know if that ...

热门标签