verifiablesoftware / vsw

Core project of VerifiableSoftware
Apache License 2.0
1 stars 0 forks source link

make incoming port configurable by user #92

Closed wenjing closed 3 years ago

wenjing commented 3 years ago

The incoming port is set to a default value 8020. For container based testing, this fixed setting means there can be only one container at the same host. It would be nice to make this configurable to allow running multiple instances of test containers to simulate different users. Note: the solution must work with localtunnel as well for the whole scheme to work.

felixchen1023 commented 3 years ago

You can specify differen port numbers when start vsw agent. below is the examples.

vsw setup wallet w1 -k1 -p 9020,9021,9022 or vsw setup wallet w1 -k1 --ports 9020,9021,9022 9020 is 9021 is 9022 is

wenjing commented 3 years ago

root@d2feb098eb8a:/# vsw setup wallet wallet4 -k 12345 -p 8030,8031,8032 usage: vsw [-h] [-p PORTS] {newwallet,wallet,connection,creddef} ... vsw: error: unrecognized arguments: -p 8030,8031,8032

wenjing commented 3 years ago

Basically working but there're some minor issues. I will downgrade this to enhancement for the future.

wenjing commented 3 years ago

Users should use it this way:

% vsw setup wallet w4 -k 12345 -p 8030,8021,8022

where, 8030 is the new port number you pick, keep ",8021,8022" always the same. I know it's dirty but a work-around from the code defects.

wenjing commented 3 years ago

Tested