implement support for HTTP proxy (#489)
This change allows the user to manually enter an unauthenticated proxy configuration to be used for all API connections. This is mainly intended for using Tusky with Tor (via Orbot or a local proxy).
This commit is contained in:
parent
73342d38cf
commit
7c83e0f87d
9 changed files with 149 additions and 8 deletions
|
|
@ -137,8 +137,10 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||
.registerTypeAdapter(Spanned.class, new SpannedTypeAdapter())
|
||||
.create();
|
||||
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
OkHttpClient.Builder okBuilder =
|
||||
OkHttpUtils.getCompatibleClientBuilder()
|
||||
OkHttpUtils.getCompatibleClientBuilder(preferences)
|
||||
.addInterceptor(new AuthInterceptor(this))
|
||||
.dispatcher(mastodonApiDispatcher);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue