wizzard bug - proxy configuration

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
Post Reply
asdf123
White ninja
White ninja
Posts: 5
Joined: 07 Feb 2018, 11:38
Distribution: 4.6.0

wizzard bug - proxy configuration

Post#1 by asdf123 » 07 Feb 2018, 11:45

Hello,

During configuration in wizzard, wizzard strips \ character in configuration. Is there any reason to strip \ character in proxy configuration?

Thanks

User avatar
fanthom
Site Admin
Site Admin
Posts: 4743
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

wizzard bug - proxy configuration

Post#2 by fanthom » 07 Feb 2018, 13:12

I cant recreate this bug.
Please provide the string which you are trying to enter and exac field in the wizard window.

Thank you.
Please add [Solved] to your thread title if the solution was found.

asdf123
White ninja
White ninja
Posts: 5
Joined: 07 Feb 2018, 11:38
Distribution: 4.6.0

wizzard bug - proxy configuration

Post#3 by asdf123 » 07 Feb 2018, 15:07

If set in wizzard:
proxy=username\here:password@myproxy.com:8080

it sets variable in system:
http_proxy=usernamehere:password@myproxy.com:8080
https_proxy=usernamehere:password@myproxy.com:8080

it strips \ character. double checked.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4743
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

wizzard bug - proxy configuration

Post#4 by fanthom » 07 Feb 2018, 16:03

Unfortunately this character is interpreted by the shell and i cant find any workaround that escaping it (shame).

Please use this:

Code: Select all

proxy=username\\\here:password@myproxy.com:8080
You may add a comment to the config that double backslash was added to workaround this bug (so you'll remember that real password is 'username\here'.

Thanks
Please add [Solved] to your thread title if the solution was found.

asdf123
White ninja
White ninja
Posts: 5
Joined: 07 Feb 2018, 11:38
Distribution: 4.6.0

wizzard bug - proxy configuration

Post#5 by asdf123 » 13 Feb 2018, 13:36

fanthom wrote:
07 Feb 2018, 16:03
Unfortunately this character is interpreted by the shell and i cant find any workaround that escaping it (shame).

Please use this: \\\
Unfortunately your solution does not work.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4743
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

wizzard bug - proxy configuration

Post#6 by fanthom » 13 Feb 2018, 15:29

Works here.

This parameter:

Code: Select all

proxy=fantho\\\m:test@192.168.0.15:3128
gives:

Code: Select all

root@automatic:~# cat /etc/profile.d/proxy.sh 
#!/bin/sh

# System proxy:
proxy=fantho\m:test@192.168.0.15:3128
[ "$proxy" = DIRECT ] || export http_proxy="http://$proxy" https_proxy="http://$proxy" ftp_proxy="http://$proxy"

# Proxy exceptions:
#noproxy=
[ "$noproxy" ] && export no_proxy="localhost,127.0.0.1,$noproxy" || export no_proxy="localhost,127.0.0.1"
Please add [Solved] to your thread title if the solution was found.

asdf123
White ninja
White ninja
Posts: 5
Joined: 07 Feb 2018, 11:38
Distribution: 4.6.0

wizzard bug - proxy configuration

Post#7 by asdf123 » 13 Feb 2018, 17:35

fanthom wrote:
13 Feb 2018, 15:29
Works here.

This parameter:
gives:
which not leads to proper string concatenation
Image

Small exercise:

Code: Select all

root@kiosk:~# test=a\b\c\d
root@kiosk:~# export test
root@kiosk:~# env |grep test
test=abcd
root@kiosk:~# 
How about:

Code: Select all

root@kiosk:~# test='a\b\c\d'
root@kiosk:~# export test
root@kiosk:~# inne=http://$test
root@kiosk:~# export inne
root@kiosk:~# env | grep -E '(test|inne)'
inne=http://a\b\c\d
test=a\b\c\d
root@kiosk:~# 
:secret:

User avatar
fanthom
Site Admin
Site Admin
Posts: 4743
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

wizzard bug - proxy configuration

Post#8 by fanthom » 13 Feb 2018, 20:24

Its enough that you add one more '\':

Code: Select all

proxy=fantho\\\\m:test@192.168.0.15:3128
Please add [Solved] to your thread title if the solution was found.

asdf123
White ninja
White ninja
Posts: 5
Joined: 07 Feb 2018, 11:38
Distribution: 4.6.0

wizzard bug - proxy configuration

Post#9 by asdf123 » 14 Feb 2018, 08:08

fanthom wrote:
13 Feb 2018, 20:24
Its enough that you add one more '\':
I don't understand. The solution you provided adds "\" to the variable, but in env the "\" it's not visible.
Still no solution using porteus wizzard.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4743
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

wizzard bug - proxy configuration

Post#10 by fanthom » 14 Feb 2018, 09:27

Instead on one backslash in your password you need to use 4 backslashes.
This works for remote management, have not tested the wizard as it requires unlocking the shell during installation which is troublesome.

This parameter:

Code: Select all

proxy=fantho\\\\m:test@192.168.0.15:3128
gives:

Code: Select all

root@automatic:~# cat /etc/profile.d/proxy.sh 
#!/bin/sh

# System proxy:
proxy=fantho\\m:test@192.168.0.15:3128
[ "$proxy" = DIRECT ] || export http_proxy="http://$proxy" https_proxy="http://$proxy" ftp_proxy="http://$proxy"

# Proxy exceptions:
#noproxy=
[ "$noproxy" ] && export no_proxy="localhost,127.0.0.1,$noproxy" || export no_proxy="localhost,127.0.0.1"
and it gives:

Code: Select all

root@automatic:~# env | grep -i proxy
no_proxy=localhost,127.0.0.1
https_proxy=http://fantho\m:test@192.168.0.15:3128
http_proxy=http://fantho\m:test@192.168.0.15:3128
ftp_proxy=http://fantho\m:test@192.168.0.15:3128
Thanks
Please add [Solved] to your thread title if the solution was found.

Post Reply