2

First time trying out GeckoView, I just wonder if is it possible to set an HTTP or SOCKS proxy to GeckoView? if yes can someone point me in the right direction?

@Composable
fun App() {
    AndroidView(
        factory = { context ->
            GeckoView(context).apply {
                val session = GeckoSession()
                session.settings.allowJavascript = true
                session.settings.useTrackingProtection = true
                val runtime = GeckoRuntime.create(context)
                session.open(runtime)
                setSession(session)

                session.loadUri("about:buildconfig")
            }
        },
        update = {}
    )
}
Jeeva
  • 3,975
  • 3
  • 23
  • 47
  • 1
    Unfortunately, HTTP/HTTPS proxy configuration is not currently supported in GeckoView1. However, you can set up a SOCKS proxy in your GeckoView by using the following code , val builder = GeckoRuntimeSettings.Builder() val args = arrayOf("socks://127.0.0.1:9150") builder.arguments(args) val settings = builder.build() val runtime = GeckoRuntime.create(applicationContext, settings) geckoSession.open(runtime) – Noob_Mern_Dev Apr 28 '23 at 09:34
  • @Noob_Mern_Dev I tried your way to set a SOCKS5 proxy but it's not working. – Jeeva May 02 '23 at 05:46

0 Answers0