For your second question read this post from @Fox ,
maybe its what you need. Its in Russian, but you can
use translator. There is an example script too >
Proxy Format
-
Hello,
I have a question.

I want to get this proxy format with .txt.
But how will I do it?
Proxy Format: ip:port:username:password
I will create a proxylist input.
But what should I write here?
When I do {{proxylist}}.split(":")[0], the port is not coming.
-
@agencywe1
http://username:password@ip:port
socks5://username:password@ip:port