Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
internal let DEFAULT_MIME_TYPE = "application/octet-stream" | |
internal let mimeTypes = [ | |
"html": "text/html", | |
"htm": "text/html", | |
"shtml": "text/html", | |
"css": "text/css", | |
"xml": "text/xml", | |
"gif": "image/gif", | |
"jpeg": "image/jpeg", |
Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
Then adding this following code to your app's manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>
(lldb) thread backtrace | |
* thread #12 | |
frame #0: 0x00007fff7d5c2304 libsystem_malloc.dylib`nanov2_size + 15 | |
frame #1: 0x00007fff7d5b78a4 libsystem_malloc.dylib`free + 107 | |
frame #2: 0x0000000100774be9 TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c850c0) at toggl_api_private.cc:152:5 | |
* frame #3: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85100) at toggl_api_private.cc:164:9 | |
frame #4: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85140) at toggl_api_private.cc:164:9 | |
frame #5: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85180) at toggl_api_private.cc:164:9 | |
frame #6: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c851c0) at toggl_api_private.cc:164:9 | |
frame #7: 0x0000000100774c4b TogglDesktopLibrary.dylib`view_item_clear(item=0x0000600009c85200) at toggl_api_private.cc:164:9 |
#! /usr/bin/env python | |
# Script to manage additional trusted root certificate in the IOS simulator | |
# | |
# Allows to add/list/delete/export trusted root certificates to the IOS simulator | |
# TrustStore.sqlite3 file. | |
# | |
# Additionally, root certificates added to a device can be listed and exported from | |
# a device backup | |
# |
// This workaround is only for iOS Swift Playground | |
// Don't need it on macOS Playground | |
import Foundation | |
// Accept all challenges from Charles or Proxyman for self-signed certificates | |
class NetworkSSlProxying: NSObject, URLSessionDelegate { | |
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { | |
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!)) | |
} | |
} |
/* ------------------------------------------------------------ * | |
* file: sslconnect.c * | |
* purpose: Example code for building a SSL connection and * | |
* retrieving the server certificate * | |
* author: 06/12/2012 Frank4DD * | |
* * | |
* gcc -lssl -lcrypto -o sslconnect sslconnect.c * | |
* ------------------------------------------------------------ */ | |
#include <sys/socket.h> |
import JavaScriptCore | |
extension JSContext { | |
subscript(key: String) -> Any { | |
get { | |
return self.objectForKeyedSubscript(key) | |
} | |
set{ | |
self.setObject(newValue, forKeyedSubscript: key as NSCopying & NSObjectProtocol) | |
} |
// /Users/nghiatran/Library/Application Support/com.proxyman.NSProxy/users/D6B9C80C.default_message_683CE65F.json | |
const file = require("@users/D6B9C80C.default_message_683CE65F.json"); | |
function onRequest(context, url, request) { | |
// Done | |
return request; | |
} | |
function onResponse(context, url, request, response) { | |
import AppKit | |
// Credit: Vadim Shpakovski from AppKitAbusers | |
class ViewController: NSViewController { | |
let textField1: CustomTextField = .init(string: "Field 1") | |
let textField2: CustomTextField = .init(string: "Field 2") | |
var observation1: NSKeyValueObservation? |