1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-27 02:09:41 +00:00

Revert "Prevent forwarding to privileged ports"

This reverts commit da00526ec1.

Refs #345
This commit is contained in:
M66B 2016-02-26 10:26:48 +01:00
parent da00526ec1
commit f6f0f62688
2 changed files with 0 additions and 9 deletions

View file

@ -49,11 +49,6 @@ public class ActivityForwardApproval extends Activity {
final int ruid = getIntent().getIntExtra("ruid", 0); final int ruid = getIntent().getIntExtra("ruid", 0);
final String raddr = (addr == null ? "127.0.0.1" : addr); 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; String pname;
if (protocol == 6) if (protocol == 6)
pname = getString(R.string.menu_protocol_tcp); pname = getString(R.string.menu_protocol_tcp);

View file

@ -194,10 +194,6 @@ public class ActivityForwarding extends AppCompatActivity {
final String raddr = etRAddr.getText().toString(); final String raddr = etRAddr.getText().toString();
final int rport = Integer.parseInt(etRPort.getText().toString()); final int rport = Integer.parseInt(etRPort.getText().toString());
final int ruid = ((Rule) spRuid.getSelectedItem()).info.applicationInfo.uid; 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>() { new AsyncTask<Object, Object, Throwable>() {
@Override @Override
protected Throwable doInBackground(Object... objects) { protected Throwable doInBackground(Object... objects) {