Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello #11

Open
sid-comunicacio opened this issue Jan 27, 2020 · 16 comments
Open

Hello #11

sid-comunicacio opened this issue Jan 27, 2020 · 16 comments

Comments

@sid-comunicacio
Copy link

I've compiled ToxProxy sucessfuly with zoff/c-toxcore on a Debian 10. I'm trying to use between a TRifa how master client... and Qtox like friend of the master client. It's possible ?

I can't receive messages from master client to qtox... may I do some specific configuration in the TRiFa master client or the qtox client ? I probe assigning ToxProxy how my own relay in the Trifa client and without it... but it never resend te messages to qtox...

What i'm doing bad ? Could be ToxProxy only works beetwen TRiFa clients ????

If I can contribute with some testing... askme without a doubt .

Thanks in advance.

@kaefert
Copy link
Owner

kaefert commented Jan 27, 2020

as far as I can remember QTox has not yet implemented the Tox multi-device support that ToxProxy is based on. Both master and friends of the master need to support this for the ToxProxy to work. So at the moment, yes only between TRiFa clients will work.

@sid-comunicacio
Copy link
Author

Ok, perfect. I try it this night. Thanks in advance. Some special configuration that I've to do... i mean, if I want that my ToxProxy relay the messages of the Trifa_client_a to Trifa_client_b , I've to select in Trifa_client_a ToxProxy as "add as ToxProxy". Must Trifa_client_b configure something about ToxProxy ????

Sorry if this are dumb questions, but I don't kwon if there is some manual or something like that for TRiFa + ToxProxy.

Thanks.

@kaefert
Copy link
Owner

kaefert commented Jan 27, 2020 via email

@sid-comunicacio
Copy link
Author

Ok, i'm triying it now.... so it works as the opposite direction that i'd thought. ToxProxy of Client_Trifa_a not will "relay" the messages that Client_Trifa_a sends to Client_Trifa_b (or Clients_trifa_xxx). ToxProxy of Client_Trifa_a will receive messages from Clients_Trifa_b (or Clients_trifa_xxx) and relay to Client_Trifa_a when Client_Trifa_a become online.... I thought that it was in the other direction.

It's like this, no ?

It's impossible to share the same instance of ToxProxy for Client_Trifa_a and Client_trifa_b, being the two clients masters of this ToxProxy. I've to run a ToxProxy for every Client_Trifa_"xxx".

I've made a test and it's working.... but.... only with 1 instance of ToxProxy serving to Client_trifa_a.

If I run 2 instances of ToxProxy in the same machine, same ip address but different port... it don't work correctly. I try to explain.

Instance_ToxProxy_A in port 33446 serving at Client_Trifa_A (Client_Trifa_A is configured with "add as Toxproxy" for Instance_ToxProxy_A) and Instance_ToxProxy_B in port 33447 serving at Client_TRifa_B (Client_Trifa_B is configured with "add as Toxproxy" for Instance_ToxProxy_B), only messages sended from Client_Trifa_B are save in Instance_ToxProxy_A to be relayed to Client_Trifa_A when it comes online. If i send something from Client_Trifa_A to Client_Trifa_B, the Instance_Toxproxy_B don't receive any message from Client_Trifa_A....

I've the logs of both Instance_ToxProxy_A and Instance_ToxProxy_B. I've seen in each log that Client_Trifa_A connects correctly to Instance_ToxProxy_A and Client_Trifa_B connects correctly to Instance_ToxProxy_B.

Well... sorry for so much questions.

I can send you the logs.

@kaefert
Copy link
Owner

kaefert commented Jan 28, 2020

You're right about the way ToxProxy works:

  • If Client_Trifa_a adds a ToxProxy instance as its proxy, the ToxProxy will accept messages from friends of Client_Trifa_a and relay them to it once it comes back online.
  • Every ToxProxy instance can only have one master, but since ToxProxy has quite low resource usage it shouldn't be a problem to run multiple instances on the same device. ToxCore should handle the network part, you don't need to fiddle arround with ports, you only need the ToxIDs each instance creates when it's started the first time.

I'm not sure what problem you're facing now, could you try to rephrase?

@migulen
Copy link

migulen commented Jan 31, 2020

Hi kaefert,

thanks for your answer. IT WORKS CORRECTLY NOW. It was a mistake from the Client_Trifa_B not adding Instance_Toxproxy_B for himself.

Your ToxProxy it's included like a function inside the TRiFa client ? I mean, an Android TRiFa client (from a friend android mobile) could do the functions of ToxProxy. I've seen that I can choose like ToxProxy my friend's tox client. May it work ?

Last question for now. Do you known who is "Tok Messenger - Lite" app for android related ? The owner i mean.

Thanks for all.

PD: There is something I can try for you ?

@migulen
Copy link

migulen commented Jan 31, 2020

Are the CircleCI scripts the correct way to compile toxproxy and c-toxcore from zoff99 ? Last time I did the compilation manually for both... and it worked, but I'm sure must be a quick and cleaner and "protocolarized" solution, are the circle_scripts for that ?

@kaefert
Copy link
Owner

kaefert commented Jan 31, 2020

I mean, an Android TRiFa client (from a friend android mobile) could do the functions of ToxProxy

Well, that's not the way zoff99 and I designed and developed ToxProxy. It was meant to be a partial implementation of a generic multi-device support.

Though of course any Tox-Client could also allow you to cache outgoing messages if the intended recipient can't be reached right now. Actually I think zoff99 implemented this feature in TRiFa. But this is completely distinct from the idea of a proxy.

We wrote the CircleCI scripts to automate builds to get automated tests and stuff like that - but yes those scripts are very close to what we believed would be "the correct way" to build toxcore & ToxProxy.

@migulen
Copy link

migulen commented Jan 31, 2020

Well, with some little modifications on circle_scripts for adapting to my environment it's almost compiled, but nasm is giving problems:

gcc -c -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o asm/nasm.o asm/nasm.c
gcc -c -g -O3 -fwrapv -U__STRICT_ANSI__ -fno-common -Werror=attributes -W -Wall -pedantic -Wc90-c99-compat -Wno-long-long -Werror=implicit -Werror=missing-braces -Werror=return-type -Werror=trigraphs -Werror=pointer-arith -Werror=missing-prototypes -Werror=missing-declarations -Werror=comment -Werror=vla -DHAVE_CONFIG_H -I. -I. -I./include -I./include -I./x86 -I./x86 -I./asm -I./asm -I./disasm -I./disasm -I./output -I./output -o stdlib/snprintf.o stdlib/snprintf.c
In file included from ./include/nasm.h:46,
from asm/nasm.c:47:
./include/nasmlib.h:194:1: error: ‘pure’ attribute on function returning ‘void’ [-Werror=attributes]
void pure_func seg_init(void);
^~~~
In file included from stdlib/snprintf.c:13:
./include/nasmlib.h:194:1: error: ‘pure’ attribute on function returning ‘void’ [-Werror=attributes]
void pure_func seg_init(void);
^~~~
cc1: some warnings being treated as errors
make: *** [Makefile:75: stdlib/snprintf.o] Error 1
make: *** Se espera a que terminen otras tareas....
cc1: some warnings being treated as errors
make: *** [Makefile:75: asm/nasm.o] Error 1

And git for x264 isn't working too, because nowadays isn't in the same location.

There are some other little bit problems with the circle_script, but just changed for me and working now. I've to change this:

In file: devs.sh

REMOVE: wget 'https://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2' -O nasm.tar.bz2
ADD: wget 'https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2' -O nasm.tar.bz2
REMOVE:echo '8d3028d286be7c185ba6ae4c8a692fc5438c129b2a3ffad60cbdcedd2793bbbe nasm.tar.bz2'|sha256sum -c
ADD: echo '34fd26c70a277a9fdd54cb5ecf389badedaf48047b269d1008fbc819b24e80bc nasm.tar.bz2'|sha256sum -c

REMOVE: git clone git://git.videolan.org/x264.git
ADD: git clone https://code.videolan.org/videolan/x264.git

@migulen
Copy link

migulen commented Jan 31, 2020

I don't know if I understand this correctly:

"Though of course any Tox-Client could also allow you to cache outgoing messages if the intended recipient can't be reached right now. Actually I think zoff99 implemented this feature in TRiFa. But this is completely distinct from the idea of a proxy."

It means that if I choose "add as ToxProxy" for my Friend_TRiFa_client in my TRiFa client and I go offline, my Friend_TRiFa_client will redirect other Friends_TRiFa_clients_XX for me when I return online. Sorry by my poor english, but I don't understand well.

I forgot to say, i compiled correctly ToxProxy (static) with my modified circle_script and it works correcly. :-)

There's some i can contribute to ToxProxy ??? You are involved on developing c-toxcore too ?

@zoff99
Copy link
Contributor

zoff99 commented Feb 1, 2020

@migulen do you have experinece with C programming and/or Android Java programming?

@kaefert
Copy link
Owner

kaefert commented Feb 1, 2020

Thanks for documenting the necessary changes for the circle_scripts to work today. As you can see in the commit history we didn't work on ToxProxy for quite some time now, so I didn't notice that some dependencies repositories / release URLs have changed.

I'm sorry but I'm not sure what you mean. Every ToxProxy instance will only relay messages from friends of his master to his master. I think (not sure) TRiFa also has a feature to cache any outgoing messages if the recipient cannot be reached. But this is completely independent of ToxProxy.

I'm not involved in c-toxcore, @zoff99 is and he helped me get the ToxProxy project on it's feet.

@migulen
Copy link

migulen commented Feb 1, 2020

Hello Zoff99,

little bit, but i've to refresh it. For the moment, i'm going to try modifying TRiFa to insert the button to autodisable "Battery Save Mode" when phone is charging, so then it isn't to be over the phone. It's a useful feature for me, that's why I wrote an "issue" about it in TRiFa project. If I manage to do it correctly, we can talk about assign some other little things.

But one thing I can do it's about translate some info from tox project from english to spanish. It could be a good thing for tox's project expansion and involving more people.

That's all... and mercy for your good work.

@zoff99
Copy link
Contributor

zoff99 commented Feb 1, 2020

@migulen the most important thing missing in TRIfA is export/import of the toxsave file.
maybe you could help out with that?

@migulen
Copy link

migulen commented Feb 2, 2020

@zoff99 until now I only arrived to compile the gits source correctly with Android Studio, sign it and run it correctly.

I'm not prepared enough to implement the export/import of the toxsave file, but i'll search some info about it, in first place which is the data to save :-9. I suppose,it's about exporting/importing the profile and all the messages and logs ? Isn't it ?

This it quite old... but i'll take a look: https://github.com/saneki-discontinued/toxfile/blob/master/src/toxfile/toxfile.c

I'll take a look in c-toxcore specs, qtox and Antox projects,too.

By the way, advances of this conversation will be post in TRiFa project :-).

Good night.

@kaefert
Copy link
Owner

kaefert commented Feb 9, 2020

I think the most important thing to be able to import/export is the toxcore savedata which would allow to migrate the tox identity between devices.

But message logs would also be nice of course, but has lower priority in my mind. (We're discussing this in the wrong project's bugtracker btw. ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants