Ultraviolet icon indicating copy to clipboard operation
Ultraviolet copied to clipboard

Discord.com doesn't work and Most sites are broken:

Open not-amplify opened this issue 9 months ago • 14 comments

Hey, I'm currently developing a proxy using UV v3 and I just get this when I try to use Discord: image Something I've noticed is it attempts to connect to ws://127.0.0.1:1 and that's the last error message before it fails I've also noticed issues with other sites :/ I'm not sure if it could be my register code but here it is:

function setupTransports() {
  let proxyMode = localforage.getItem('proxyMode') || 'epoxy'
  var bare = localforage.getItem("bare") || location.host + "/bare";
  var wispUrl = (location.protocol === "https:" ? "wss" : "ws") + "://" + location.host + "/wisp/";
  if (proxyMode == "epoxy") {
    BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
  } else if (proxyMode == "bare") {
    BareMux.SetTransport("BareMod.BareClient", bare);
  } else if (proxyMode == "libcurl") {
    BareMux.SetTransport("CurlMod.LibcurlClient", { wisp: wispUrl, wasm: "/assets/other/libcurl.wasm" });
  } else {
    BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: wispUrl });
  }
}

if ('serviceWorker' in navigator) {
    BareMux.registerRemoteListener(navigator.serviceWorker.controller)
    navigator.serviceWorker.ready.then(async () => {
      setupTransports();
    });
    var proxySetting = localStorage.getItem('proxy') || 'uv';
    let swConfig = {
      'uv': { file: '/proxies/@/sw.js', config: __uv$config },
      'dyn': { file: '/proxies/dynamic/sw.js', config: __dynamic$config }
    };

    let { file: swFile, config: swConfigSettings } = swConfig[proxySetting];

    navigator.serviceWorker.register(swFile, { scope: swConfigSettings.prefix })
      .then((registration) => {
        console.log('ServiceWorker registration successful with scope: ', registration.scope);
        form.addEventListener('submit', async (event) => {
          event.preventDefault();

          let encodedUrl = swConfigSettings.prefix + crypts.encode(search(address.value));
          sessionStorage.setItem("encodedUrl", encodedUrl);
          const browseSetting = localStorage.getItem('browse');
          const browseUrls = {
            "edu": "/edu",
            "tabs": "/tabs",
            "norm": encodedUrl
          };
          
          const urlToNavigate = browseUrls[browseSetting] || "/edu";
          location.href = urlToNavigate;
        });
      })
      .catch((error) => {
        console.error('ServiceWorker registration failed:', error);
      });
  }
}

Any help would be appreciated

not-amplify avatar May 01 '24 12:05 not-amplify

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Percslol avatar May 01 '24 21:05 Percslol

also the error you specified seeing is fine, thats just bare-mux's fake websocket

Percslol avatar May 01 '24 21:05 Percslol

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Ultraviolet v3.1 with a modification from illusionsTBA’s middleware injection UV.

not-amplify avatar May 02 '24 11:05 not-amplify

That shouldn’t affect it tho

not-amplify avatar May 02 '24 11:05 not-amplify

could you try a fresh version off of the GitHub releases or npm?

Percslol avatar May 02 '24 15:05 Percslol

could you try a fresh version off of the GitHub releases or npm?

I updated my repo with ur version and its still not working now I'm also having a bare clients issue, siggggggghhhhhhhhhhhhhhh.....................

not-amplify avatar May 02 '24 15:05 not-amplify

There’s a error if ('serviceWorker' in navigator) { BareMux.registerRemoteListener(navigator.serviceWorker.controller) navigator.serviceWorker.ready.then(async () => { setupTransports(); })}; i added a }

Bear-a1t avatar May 04 '24 01:05 Bear-a1t

There’s a error if ('serviceWorker' in navigator) { BareMux.registerRemoteListener(navigator.serviceWorker.controller) navigator.serviceWorker.ready.then(async () => { setupTransports(); })}; i added a }

What the full code so I can see the difference I’m always dumb and confused on 2 hours of sleep

not-amplify avatar May 04 '24 01:05 not-amplify

This was previous if ('serviceWorker' in navigator) { BareMux.registerRemoteListener(navigator.serviceWorker.controller) navigator.serviceWorker.ready.then(async () => { setupTransports(); });

 this is what i did 
 
 
 if ('serviceWorker' in navigator) {

BareMux.registerRemoteListener(navigator.serviceWorker.controller) navigator.serviceWorker.ready.then(async () => { setupTransports(); })};

Bear-a1t avatar May 04 '24 01:05 Bear-a1t

Okay

not-amplify avatar May 04 '24 03:05 not-amplify

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Ultraviolet v3.1 with a modification from illusionsTBA’s middleware injection UV.

Illusions version of UV has not been updated to UV 3x. If your using it that's probably why. If you flat out modified UV you probably just messed up

Notplayingallday383 avatar May 05 '24 12:05 Notplayingallday383

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Ultraviolet v3.1 with a modification from illusionsTBA’s middleware injection UV.

Illusions version of UV has not been updated to UV 3x. If your using it that's probably why. If you flat out modified UV you probably just messed up

I directly modified UV. I can confirm that it is not me because UV v3 without the modifications doesn’t work still

not-amplify avatar May 05 '24 14:05 not-amplify

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Ultraviolet v3.1 with a modification from illusionsTBA’s middleware injection UV.

Illusions version of UV has not been updated to UV 3x. If your using it that's probably why. If you flat out modified UV you probably just messed up

I directly modified UV. I can confirm that it is not me because UV v3 without the modifications doesn’t work still

UV v3 without modifications seems to work on the public proxy instances, could you send me the link to the repo where v3 is trying to be implemented if thats possible

Percslol avatar May 05 '24 15:05 Percslol

can you tell me what release of v3 you are using, everything seems to be fine on latest and sites seem to be loading

Ultraviolet v3.1 with a modification from illusionsTBA’s middleware injection UV.

Illusions version of UV has not been updated to UV 3x. If your using it that's probably why. If you flat out modified UV you probably just messed up

I directly modified UV. I can confirm that it is not me because UV v3 without the modifications doesn’t work still

UV v3 without modifications seems to work on the public proxy instances, could you send me the link to the repo where v3 is trying to be implemented if thats possible

https://github.com/NightProxy/Night-UV I gotta redo the mods to update the repo cause I also modified the build

not-amplify avatar May 06 '24 18:05 not-amplify

Discord works perfectly fine for me, using a Gitpod deployment

catfoolyou avatar Aug 29 '24 15:08 catfoolyou

Discord works perfectly fine for me, using a Gitpod deployment

do you not see this issue is dead ;-;

not-amplify avatar Aug 29 '24 20:08 not-amplify