mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
16 lines
483 B
Swift
16 lines
483 B
Swift
//
|
|
// Created by Adam Stragner
|
|
//
|
|
|
|
import Foundation
|
|
|
|
internal extension URLSession {
|
|
static let `default` = URLSession(configuration: .default)
|
|
static var proxyable: URLSession?
|
|
|
|
static func proxyable(with connectionProxyDictionary: [AnyHashable: Any]) -> URLSession {
|
|
let configuration = URLSessionConfiguration.default
|
|
configuration.connectionProxyDictionary = connectionProxyDictionary
|
|
return URLSession(configuration: configuration)
|
|
}
|
|
}
|