Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wongzigii/etchosts
Resolve host names to custom IP addresses.
https://github.com/wongzigii/etchosts
etchosts hosts
Last synced: about 1 month ago
JSON representation
Resolve host names to custom IP addresses.
- Host: GitHub
- URL: https://github.com/wongzigii/etchosts
- Owner: wongzigii
- License: mit
- Created: 2017-02-12T12:20:01.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-04T07:03:25.000Z (almost 8 years ago)
- Last Synced: 2024-10-13T12:08:42.549Z (3 months ago)
- Topics: etchosts, hosts
- Language: Swift
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EtcHosts
EtcHosts is a URLSession-based framework for *OS to resolves host name to specific IP address directly, likes `/etc/host` in *inux.
## Example
Usage is brain-dead simple with two lines of codes.
````swift
import EtcHosts
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
URLProtocol.registerClass(EtcHostsURLProtocol.self)
EtcHostsURLProtocol.configureHosts { (configuration) in
configuration.resolveHostName(hostname: "google.com", to: "192.168.0.1")
}return true
}
````## LICENSE
MIT