Skip to content

Config file fails to build #1

@bobpaul

Description

@bobpaul

When starting without HIDEME_ALLOW_NETWORKS defined and when two networks are attached to the hideme docker container, I get this error in prepareconfig.sh

hidemevpn  | s6-rc: info: service legacy-cont-init successfully started
hidemevpn  | Config file missing, create it..                                                  
hidemevpn  | Main: Unsupported command 192.168.254.253/27                                      
hidemevpn  | Usage:                                                                            
hidemevpn  |   /opt/hide.me/hide.me [options...] <command> [host]                              
hidemevpn  |                                                                                   
hidemevpn  | command:                                                                          
hidemevpn  |   token - request an Access-Token (required for connect)                          
hidemevpn  |   connect - connect to a vpn server                                               
hidemevpn  |   conf - generate a configuration file to be used with the -c option              
hidemevpn  |   categories - fetch and dump filtering category list    

Adding an echo, I see the command it's using the generate the config is:

/opt/hide.me/hide.me -pf -forceDns -s 192.168.254.253/27 192.168.254.200/27 conf

looking at the value of ${networks4}, I see there's a newline instead of a comma

echo "networks4: ${networks4}"
networks4: 192.168.254.200/27              
192.168.254.253/27

I think this is because there's multiple network adapters:

245ce9194894:/opt/hide.me# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
3034: eth1@if3035: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:c0:a8:fe:c8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.200/27 brd 192.168.254.223 scope global eth1
       valid_lft forever preferred_lft forever
3036: eth0@if3037: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:c0:a8:fe:fd brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.253/27 brd 192.168.254.255 scope global eth0
       valid_lft forever preferred_lft forever

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions