Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
not-amplify opened this issue May 1, 2024 · 14 comments
Open

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

not-amplify opened this issue May 1, 2024 · 14 comments

Comments

@not-amplify
Copy link

not-amplify commented May 1, 2024

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 not-amplify changed the title Discord.com doesn't work Discord.com doesn't work and Most sites are broken: May 1, 2024
@Percslol
Copy link
Collaborator

Percslol commented May 1, 2024

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
Copy link
Collaborator

Percslol commented May 1, 2024

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

@not-amplify
Copy link
Author

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
Copy link
Author

That shouldn’t affect it tho

@Percslol
Copy link
Collaborator

Percslol commented May 2, 2024

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

@not-amplify
Copy link
Author

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.....................

@Bwlake
Copy link

Bwlake commented May 4, 2024

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

@not-amplify
Copy link
Author

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

@Bwlake
Copy link

Bwlake commented May 4, 2024

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();
})};

@not-amplify
Copy link
Author

Okay

@Notplayingallday383
Copy link

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

@not-amplify
Copy link
Author

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

@Percslol
Copy link
Collaborator

Percslol commented May 5, 2024

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

@not-amplify
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants