2020-12-28 22:29:00 +02:00
2020-12-28 22:29:00 +02:00
2020-12-24 18:01:47 +02:00
2020-12-24 18:01:47 +02:00
2020-12-24 18:09:39 +02:00
2020-12-24 18:39:03 +02:00
2020-12-27 20:24:59 +02:00

Il2Cpp TLS Providers for Mono 6.12

Implements common Mono TLS providers for modding Unity games which use Il2Cpp runtime.
This allows to use HTTPS the same way you'd do it in a normal Unity game using Mono runtime.

Currently, this repo implements the following TLS providers:

  • UnityTls -- official Unity TLS provider adapted from unity-mono repository
  • LegacyTls -- port of old mono SSL 1.0-3.0 and TLS 1.0 providers to new Mobile TLS API

All TLS providers were updated for use with Mono 6.12.

How to use

If you use BepInEx

You don't have to do anything: this adapter is automatically included and initialized by BepInEx core.
You can use normal HTTP/HTTPS API like you are used to.

If you don't use BepInEx

If you don't write BepInEx plugins, you have to bootstrap this adapter yourself.
To do this:

  1. Download latest version of the bootstrapper from releases.
  2. Download latest version of HarmonyX from releases.
  3. In your main code, reference Il2Cpp.TlsAdapter.dll and include the following line before using any HTTP/HTTPS requests:
    using Il2Cpp.TlsAdapter;
    Il2CppTlsAdapter.Initialize();
    
    This will initialize the adapter and automatically pick the best available TLS provider.
  4. Optional: To enable UnityTLS, you need to provide pointer to the UnityTLS native interface with:
    Il2CppTlsAdapter.Options.UnityTlsInterface = /* Obtain and assign the interface pointer */:
    
    If no interface is specified, LegacyTls is used instead.

WIP The tool is not ready yet: for example UnityTls is not configurable and Initialze doesn't do much interesting at the moment.

S
Description
No description provided
Readme LGPL-2.1
1.5 MiB
0 Stars 1 Watchers 0 Forks
Version 1.0.0
Latest
2026-11-12 11:09:39 -10:00
Languages
C# 100%