tuyafeng / Via

Via is a simple browser, and this repository is set for localization.
2.84k stars 320 forks source link

command line feature request #1538

Open louiesun opened 1 month ago

louiesun commented 1 month ago

Is your feature request related to a problem? Please describe. On chromium on Windows, we can open the chromium with some command line settings. For example, we may use chrome.exe --host-resolver-rules="MAP www.test.com 127.0.0.1:8080". It is avalavle on Android indeed, but it requires ADB or changing the data dictionanry which need to be rooted.

Describe the solution you'd like Can we use text file with a location availabe to unrooted location? I don't know a lot to the chromium, but I think just adding a location to read may be easy?

Describe alternatives you've considered Some settings are in chrome://flags, but most of then are not, such as the --host-resolver-rules.

Additional context Android Chromium will automatically read the command line here. Chromium

louiesun commented 1 month ago

这样也可以顺便实现设置代理等功能

sekedus commented 1 month ago

Open Via Browser from CLI

  1. From your device

    • Install & open Termux or TermOne Plus
    • Run command:
      am start -n mark.via.gp/mark.via.Shell
      #                                ^
      #                            uppercase
  2. From your PC with ADB

    • Enable Developer options & USB debugging on your device, howto
    • Install ADB on your PC, howto
    • Connect your device to your PC with USB cable
    • Open Command Prompt/Terminal window
    • Run command: adb devices
    • Accept an RSA key for allows debugging through your PC
    • Run command: adb shell monkey -p mark.via.gp 1

credits: https://android.stackexchange.com/a/128654/379902

louiesun commented 1 month ago

Open Via Browser from CLI

  1. From your device

am start -n mark.via.gp/mark.via.Shell
#                                ^
#                            uppercase

Thank you. But I want to shell the application with some command line swiches. Like on Windows: I don't want to simply shell chrome like this:

chrome

Instead, on Windows, I shell like this:

chrome --host-resolver-rules="MAP www.v2ray.com 172.64.145.17:443" -origin-to-force-quic-on=www.v2ray.com:443

So are there any way to shell the browser with some command line flags? maybe like this:? (It doesn't run on my device. )

am start -n mark.via.gp/mark.via.Shell --host-resolver-rules="MAP www.v2ray.com 172.64.145.17:443" -origin-to-force-quic-on=www.v2ray.com:443
sekedus commented 1 month ago

So are there any way to shell the browser with some command line flags?

As far as I know, you can't use command line flags in android browser. CMIIW