Global Variable
kCFStreamPropertySOCKSProxy
SOCKS proxy property key.
SDKs
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Discussion
To set a CFStream
object to use a SOCKS proxy, call CFReadStreamSetProperty
or CFWriteStreamSetProperty
with the property name set to kCFStreamPropertySOCKSProxy
and its value set to a CFDictionary
object having at minimum a kCFStreamPropertySOCKSProxyHost
key and a kCFStreamPropertySOCKSProxyPort
key. For information on these keys, see CFStream SOCKS Proxy Key Constants. SystemConfiguration returns a CFDictionary for SOCKS proxies that is usable without modification.
See Also
Streams
kCFStreamPropertyHTTPFinalRequest
HTTP Final Request property. A value of type CFHTTPMessage containing the final message transmitted by the stream after all modifications (including authentication, connection policy, redirects, and so on) have been made. This property cannot be set.
DeprecatedkCFStreamPropertyHTTPFinalURL
HTTP Final URL property. A value of type CFURL containing the final HTTP URL. This value differs from the URL in the original HTTP request if an autoredirection occurred. This property cannot be set.
DeprecatedkCFStreamPropertyHTTPShouldAutoredirect
HTTP Should Auto Redirect property. Set this property to kCFBooleanTrue
to enable autoredirection; set this property to kCFBooleanFalse
to disable autoredirection.
DeprecatedkCFStreamPropertyFTPFileTransferOffset
FTP File Transfer Offset stream property key for set and copy operations. The value of this property is a CFNumber of type kCFNumberLongLongType
representing the file offset at which to start the transfer.
DeprecatedkCFStreamPropertyFTPPassword
FTP Password stream property key for set and copy operations. A value of type CFString for storing the login password. Don’t set this property when anonymous FTP is desired.
DeprecatedkCFStreamPropertyFTPProxy
FTP Proxy stream property key for set and copy operations. The property is a value of type CFDictionary that holds proxy dictionary key-value pairs. The dictionary returned by SystemConfiguration can also be set as the value of this property.
DeprecatedkCFStreamPropertyFTPResourceSize
FTP Resource Size read stream property key copy operations. This property stores a CFNumber of type kCFNumberLongLongType
representing the size of a resource in bytes.
DeprecatedkCFStreamPropertyFTPUsePassiveMode
FTP Passive Mode stream property key for set and copy operations. Set this property to kCFBooleanTrue
to enable passive mode; set this property to kCFBooleanFalse
to disable passive mode.
DeprecatedkCFStreamPropertyFTPUserName
FTP User Name stream property key for set and copy operations. A value of type CFString for storing the login user name. Don’t set this property when anonymous FTP is desired.
DeprecatedCFSocketStreamSOCKSGetError
This function gets error codes in the kCFStreamErrorDomainSOCKS
domain from the CFStreamError
returned by a stream operation.
kCFStreamNetworkServiceType
The type of service for the stream. Providing the service type allows the system to properly handle certain attributes of the stream, including routing and suspension behavior. Most streams do not need to set this property. See Stream Service Types for a list of possible values.
kCFStreamErrorDomainWinSock
When running CFNetwork code on Windows, this domain returns error codes associated with the underlying TCP/IP stack. You should also note that non-networking errors such as ENOMEM
are delivered through the POSIX domain. See the header winsock2.h
for relevant error codes.
kCFStreamPropertyConnectionIsCellular
A boolean value indicating whether the stream is connected over a cellular (WWAN) interface. This is a read-only property, and is false
until the connection has been established.
kCFStreamPropertyNoCellular
A Boolean value indicating that the connection should not be established over a cellular (WWAN) connection. This value can only be set before you open the stream.
kCFStreamPropertySSLPeerTrust
SSL Peer Trust property key for copy operations, which return a SecTrustRef
object containing the result of the SSL handshake.
kCFStreamSSLCertificates
Security property key whose value is a CFArray of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef.
kCFStreamSSLIsServer
Security property key whose value indicates whether the connection is to act as a server in the SSL process.
kCFStreamSSLLevel
Security property key whose value specifies the stream’s security level.
kCFStreamSSLPeerName
Security property key whose value overrides the name used for certificate verification.