Updated readme, fixed pod lint warnings

This commit is contained in:
Mikhail Churbanov 2018-05-31 23:29:01 +03:00
parent b61255892e
commit cb24d2c766
3 changed files with 48 additions and 4 deletions

1
.swift-version Normal file
View File

@ -0,0 +1 @@
4.1

View File

@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = 'ProxyResolver'
s.version = '0.1.0'
s.summary = 'A short description of ProxyResolver.'
s.summary = 'Simple resolution of user proxy settings for macOS'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
@ -18,7 +18,9 @@ Pod::Spec.new do |s|
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
ProxyResolver allows simply resolve the actual proxy information from users
system configuration and could be used for setting up Stream-based connections,
for example for Web Sockets.
DESC
s.homepage = 'https://github.com/rinold/ProxyResolver'

View File

@ -5,11 +5,50 @@
[![License](https://img.shields.io/cocoapods/l/ProxyResolver.svg?style=flat)](https://cocoapods.org/pods/ProxyResolver)
[![Platform](https://img.shields.io/cocoapods/p/ProxyResolver.svg?style=flat)](https://cocoapods.org/pods/ProxyResolver)
## Example
ProxyResolver allows simply resolve the actual proxy information from users
system configuration and could be used for setting up Stream-based connections,
for example for Web Sockets.
To run the example project, clone the repo, and run `pod install` from the Example directory first.
Usage example:
```swift
import ProxyResolver
let proxy = ProxyResolver()
let url = URL(string: "https://github.com")!
proxy.resolve(for: url) { result in
switch result {
case .success(let proxy):
guard let proxy = proxy else {
// no proxy required
}
// here you can establish connection to proxy or whatever you want
// print ("For \(url) use \(proxy.host):\(proxy.port)")
case .failure(let error):
// Handle error
}
}
```
## Features
#### Supported system configurations
- [x] Auto Proxy Discovery*
- [x] Automatic Proxy Configuration URL*
- [x] Web Proxy
- [x] Socks
> \* due to ATS protection auto-configuration url should be HTTPS or have \*.local or unresolvable globally domain with `NSAllowsLocalNetworking` key configured in plist. More info could be found in [NSAppTransportSecurity reference](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33).
#### Other (TBD)
- Proxy with required password support
> `Proxy.credentials` will automatically access `Proxy` keychain to retrieve configured for proxy account and password. As it would require permission from user the credentials are retrieved lazily only when you try to get them.
## Requirements
- Swift: 4.0+
- macOS: 10.0+
## Installation
@ -22,6 +61,8 @@ pod 'ProxyResolver'
## Author
ProxyResolver was initially inspired by the Starscream proxy support merge request.
rinold, mihail.churbanov@gmail.com
## License