NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 195 forks source link

Add --proxy option to enable the network proxy for the http requests in the android emulator. #5349

Open huyaxiong opened 4 years ago

huyaxiong commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, I couldn't set a network proxy for the http requests in the android emulator. I noticed that avd has this option but tns doesnt. And I did all the searching in the documents and stackoverflow and still didnt find one. Currently I am on a project that have to request facebook's api, but I am in China, I cant access those api with proxy in the android emulator, so I am stuck on it now.

Describe the solution you'd like Add --proxy option to enable the network proxy for the http requests in the android emulator like avd -http-proxy did.

Describe alternatives you've considered I think --proxy is the most straightforward solution, or u could add some additional file in the project to have this function.

Additional context I think its a key function, for users in mainland China, without proxy or vpn, they cant access public api from Twitter or Facebook, so please add this function ASAP, thanks.

janoshrubos commented 3 years ago

You can set proxy in your local environment in NativeScript with ns proxy set [<Url> [<Username> [<Password>]]].

More info here