mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-24 23:23:08 +00:00
parent
b43f6971c3
commit
da00526ec1
2 changed files with 9 additions and 0 deletions
|
@ -49,6 +49,11 @@ public class ActivityForwardApproval extends Activity {
|
|||
final int ruid = getIntent().getIntExtra("ruid", 0);
|
||||
final String raddr = (addr == null ? "127.0.0.1" : addr);
|
||||
|
||||
if (rport < 1024) {
|
||||
Log.w(TAG, "Port forwarding to privileged port not possible");
|
||||
finish();
|
||||
}
|
||||
|
||||
String pname;
|
||||
if (protocol == 6)
|
||||
pname = getString(R.string.menu_protocol_tcp);
|
||||
|
|
|
@ -194,6 +194,10 @@ public class ActivityForwarding extends AppCompatActivity {
|
|||
final String raddr = etRAddr.getText().toString();
|
||||
final int rport = Integer.parseInt(etRPort.getText().toString());
|
||||
final int ruid = ((Rule) spRuid.getSelectedItem()).info.applicationInfo.uid;
|
||||
|
||||
if (rport < 1024)
|
||||
throw new IllegalArgumentException("Port forwarding to privileged port not possible");
|
||||
|
||||
new AsyncTask<Object, Object, Throwable>() {
|
||||
@Override
|
||||
protected Throwable doInBackground(Object... objects) {
|
||||
|
|
Loading…
Reference in a new issue