<!--
{
  "documentType" : "article",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/cfstream-socks-proxy-key-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "CFStream SOCKS Proxy Key Constants"
}
-->

# CFStream SOCKS Proxy Key Constants

Constants for SOCKS Proxy `CFDictionary` keys.

## Discussion

When setting the stream’s SOCKS Proxy property, the property’s value is a `CFDictionary` object containing at minimum the kCFStreamPropertySOCKSProxyHost and kCFStreamPropertySOCKSProxyPort keys. The dictionary may also contain the other keys described in this section.

## Topics

### Constants

[`let kCFStreamPropertySOCKSProxyHost: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSProxyHost)

Constant for the SOCKS proxy host key.

[`let kCFStreamPropertySOCKSProxyPort: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSProxyPort)

Constant for the SOCKS proxy host port key.

[`let kCFStreamPropertySOCKSVersion: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSVersion)

Constant for the SOCKS version key.

[`let kCFStreamSocketSOCKSVersion4: CFString`](/documentation/CoreFoundation/kCFStreamSocketSOCKSVersion4)

Constant used in the `kCFStreamSockerSOCKSVersion` key to specify SOCKS4 as the SOCKS version for the stream.

[`let kCFStreamSocketSOCKSVersion5: CFString`](/documentation/CoreFoundation/kCFStreamSocketSOCKSVersion5)

Constant used in the `kCFStreamSOCKSVersion` key to specify SOCKS5 as the SOCKS version for the stream.

[`let kCFStreamPropertySOCKSUser: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSUser)

Constant for the key required to set a user name.

[`let kCFStreamPropertySOCKSPassword: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSPassword)

Constant for the key required to set a user’s password.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)