osu-crypto / libPSI

A repository for private set intersection.
Other
168 stars 47 forks source link

does libpsi support nginx proxy? #54

Closed yuanbw closed 1 year ago

yuanbw commented 1 year ago

Does the communication between the two parties in libpsi support the Nginx proxy? I simulated two participants in the internal network environment, and proxyed port 1212 through Nginx four-layer proxy, here is the config

stream { upstream party { server 192.168.254.13:1212; }

server { listen 1212; proxy_connect_timeout 20s; proxy_timeout 5m; proxy_pass party; } }

receiver: frontend.exe -kkrt -in /tmp/user1.csv -csv -r 1 -out /tmp/psi.out -ip 0.0.0.0:1212

sender: frontend.exe -kkrt -in /tmp/user2.csv -csv -r 0 -ip 60.174.229.145:1212

Assuming that the content of the user1.csv file is 1,2, and the content of the user2.csv file is 2,3, the content of the result file /tmp/psi.out should have a value, but in fact the content of /tmp/psi.out is empty.

yuanbw commented 1 year ago

I suspect that in production systems, besides port 1212, there may be other ports that need to be proxied?

ladnir commented 1 year ago

No. This isn't a production system.

didadida321 commented 1 year ago

No. This isn't a production system.

I also encountered the same problem, the out result is empty, is there any way to debug or see the log?

ladnir commented 1 year ago

https://github.com/osu-crypto/libPSI/blob/master/frontend/main.cpp#L506

the input should have one element per row

ladnir commented 1 year ago

you can also see this unit test. https://github.com/osu-crypto/libPSI/blob/master/libPSI_Tests/FileBase_Tests.cpp#L215