l = str.length;
	l = (4 - l % 4) % 4;
	if (l) str = padright(str, l, "=");
	return atob(str);
}

function dictvalue(d, key) {
	var v = d[key];
	if (typeof (v) == 'undefined' || v == '') return '';
	return b64decsafe(v);
}

function export_ssr_url(btn, urlname, sid) {
	var s = document.getElementById(urlname + '-status');
	if (!s) return false;
	var v_server = document.getElementsByName('cbid.bypass.' + sid + '.server')[0];
	var v_port = document.getElementsByName('cbid.bypass.' + sid + '.server_port')[0];
	