SasukeFreestyle / Hysteria2-Iran

Hysteria2 Server for bypassing internet censorship in Iran.
16 stars 3 forks source link

Active: active (running) Issue #1

Closed Phoenix-999 closed 1 year ago

Phoenix-999 commented 1 year ago

Hi @SasukeFreestyle, Thank you for the clear guidelines on setting up Hysteria2-Iran. I followed all your instructions step by step. However, when I launched Sing-box and checked if it was running or not, I received this message: Active: activating (auto-restart)

Screenshot 2023-09-19 at 14 52 17

Could you please assist me in resolving this issue? Thank you in advance

SasukeFreestyle commented 1 year ago

I think maybe there is something wrong in the config.json file

could you cd into hy2 directory and run

./sing-box run -c config.json

Do you get any errors?

Also show me your hy2.service file.

Phoenix-999 commented 1 year ago

@SasukeFreestyle

Just to be sure, I wiped the VPS and started fresh from the beginning. The VPS is fully updated as well.

However, I'm still facing the same problem. Please see the screenshots below for your reference.

Screenshot 2023-09-19 at 15 38 58

Screenshot 2023-09-19 at 15 36 21

Screenshot 2023-09-19 at 15 37 25

SasukeFreestyle commented 1 year ago

Everything looks fine 🤔 paths looks correct e.t.c

Im trying to reproduce the error but I'm unable to.

Also i updated my hy2.service file. It was missing some parts.

What happens if you do

sudo ./sing-box run -c config.json

?

Phoenix-999 commented 1 year ago

@SasukeFreestyle Here you are

The strange thing is i create a new VPS and and having a same problem !!! Do you think i might be of Firewall Rule??

FATAL[0000] decode config at config.json: json: cannot unmarshal string into Go value of type option._Options

Screenshot 2023-09-19 at 17 27 00

SasukeFreestyle commented 1 year ago

I just followed my guide again and I'm still unable to reproduce.

1 The error here is because i used ctrl+c to close the program, But its running perfectly.

I also changed port to 83 in the config.json, because i'm currently hosting on port 443. But everything else is the same as you provided in pictures.

2 3 4

what does this command say?

sudo lscpu | grep Architecture

bild

sudo ss -tulpn | grep :443

5

Phoenix-999 commented 1 year ago

@SasukeFreestyle The same as yours... I'm not sure what might be the problem. Maybe it's my VPS service provider!!!

Screenshot 2023-09-19 at 17 59 38

I've tried this method and H2 seems working but it is not even close to yours. Yours is much better :) https://bulianglin.com/archives/hysteria2.html

SasukeFreestyle commented 1 year ago

Thank you again for your kind words.

I will look into this, I honestly have no idea why this error occurs for you.

Leaving issue open until you or someone else find a solution.

Phoenix-999 commented 1 year ago

Thank you, @SasukeFreestyle I've always enjoyed your outstanding works. I'll also explore and experiment with it to see if I can identify the cause of this anomaly. I'll be sure to keep you updated if I manage to get to the bottom of it.

I truly appreciate your time and support. Have a good one dude

Phoenix-999 commented 1 year ago

Hi @SasukeFreestyle Just thought I'd give you a quick update following our previous conversation. After experimenting and testing your code, I eventually managed to get it working. So, here are the small changes I made in order to resolve the issue. It appears, for whatever reason, that the default user 'root' is causing a problem. So, I created a new one using the following code:

adduser --force-badname new_username
usermod -aG sudo new_username
exit

Then, I logged in again using the new user:

ssh new_username@Server_ip

Then, following your instructions, and everything is working fine now!"

Screenshot 2023-09-24 at 05 18 40

Screenshot 2023-09-24 at 05 16 15

Also, here is the speed test if you are interested to know

WhatsApp Image 2023-09-24 at 05 15 12

Thank you again for your help and support.🙏🏽

SasukeFreestyle commented 1 year ago

I'm glad you got it working.

I've not tried running sing-box as root user as I prefer not to run any programs as root unless its necessary.

I will try to run it as root myself later (busy today) if root does not work for me I will update the guide with a notice that it does not work with root user.

Closing this issue as it is resolved.